Question about latent events

Hi.
From the info available about latent events, they belong to a different event pool and they are sent to the targeted clients sliced (about the rate sent with the event itself). Are they also supposed to arrive in order?
Example:

Suppose I have a wrapper for latent server events that send them with a rate of 1KB/s.

  • I send one event (we’ll call it event_1) weighting 100B.
  • Wait 50ms + (probably server tick) another 50ms
  • I send another one (we’ll call it event_2) weighting 400B.

Depending on the network traffic at the moment(on that pool maybe? neteventlog doesn’t tell if the events are latent ones or not).
The event_1 will reach the client AFTER event_2, even though it was triggered first and weights less (this doesn’t matter I think as the packet size is lower that the send rate specified).
In an empty server this doesn’t occur at all (the net traffic is way lower as well).

In my use case, state synchronization sends the whole state at the time. I can’t use global state bags, as its (state) size is not predictable, nor from normal events (same reason as global statebags), so I chose latent, as I don’t care when they arrive but they MUST arrive in the correct order, which isn’t happening in my case.

I also know that I can workaround this by tagging each sync with an id and track it on the client so that I dont override previous state but it isn’t a solution at all.

Is there anyway that I can debug this further or is this an actual bug or just expected behaviour in some way?

Nope, these are unordered. If you want ordering guarantees you could indeed buffer them on the receiving side.

1 Like

Ok, thank you for the quick answer.
Already applied the identifier tag for these type of sync events.