Hi @radekm, great question!
Solace offers strong ordering guarantees, but it’s important to remember the limits to those guarantees:
- Ordering is guaranteed at ingress to the broker. In other words, we can’t guarantee ordering in one broker will be the same in another broker in a mesh, because we can’t guarantee the network between the two broker instances. Also, we can only order things on the basis of their arrival time to the broker - the time they were received, not the time the sender sent them.
- Ordering is guaranteed across the same topic.
- If the receiver is a direct subscriber (so a subscriber to a topic, not a consumer from a queue) messages can, of course, be lost to that subscriber in accordance with the DIRECT quality of service, which will disturb ordering to that client.
- Ordering is guaranteed across fail-overs (HA pair or DR).
Applying these principles to your questions:
- In all probability yes, but we can’t guarantee it, and you shouldn’t rely on it. If you’re using the same service to publish to both topics, I can’t think of a case where ordering wouldn’t be preserved, but the problem comes when you have two different publishers, each publishing to a separate topic - there we definitely can’t guarantee ordering across the different topics, which is why you shouldn’t rely on ordering across different topics in the single publisher case.
- No, ordering is dependent on the topic to which the messages are published and the order of arrival at the broker. The format of the subscription does not affect the ordering of delivery to a subscriber.
- Only if the other publisher affects the order of your first publisher’s messages arrive at the broker. This could happen if the second publisher causes network congestion, for example.