Aaron’s argument that under certain assumptions (notably the same publisher on the same thread), the message order across topics is determined by their order they are received by the broker and whether they’re published to different topics.
I can also see that publishing by two different publishers can give rise to inconsistent message ordering in what he describes as a race situation (when publishing to to different topics).
This begs the question, can this race situation, when two publishers are publishing near simultaneously, be more predictable if they are publishing to the the same topic vs different topics (i.e. first pips the post and other has to wait)?
My sense is that if two or more messages are received near simultaneously from multiple publishers and their ordering is critical, then other mechanisms are needed to resolve precedence, this is not role of the broker with decoupled publishers (and consumers).
Appreciate any further thoughts on this, as message ordering receives fairly light treatment in the documentation.
@Aaron will you be able to respond to this question given the other thread was from 2021. Our publisher may not necessarily publish messages in one TCP session, as in the API/system maybe be restarted and renew a session.
The question really is:
Does Event Broker send messages to queues (with multiple topic subscriptions) in the order the messages have arrived across multiple TCP sessions? Assuming Publisher is a singleton.