Other Considerations
The Broker guarantees that events from a single publishing client cannot be processed out of order. This has important implications when more than one Broker client is sharing the same event queue because the Broker will not return an event to Broker client which is incapable of acknowledging the event.
The table below shows an example client event queue containing event received from three different publishing clients; Client A, Client B, and Client C.
Publishing Client | Event Queue Position |
Client A | 1 |
Client B | 2 |
Client A | 3 |
Client C | 4 |
Client B | 5 |
Client C | 6 |
Consider these steps:
1. Broker client X receives the event from queue position 1 without acknowledging the event.
2. Broker client Y receives the event from queue position 2 without acknowledging the event.
3. Broker client Y then asks for another event and is given the event from queue position 4.
Because the last event from publishing Broker client A has not yet been acknowledged, the next event in the queue from Broker client A cannot be given to a different receiving Broker client.
By enforcing these acknowledgment rules, the Broker allows you to write client applications that process events from a single queue across multiple threads of control.