Message ordering guarantees in core NATS #7577
-
|
I'm trying to understand the exact scope of ordering guarantees in core NATS, not JetStream. Scenario
All subscriptions are created before any publish. Is ordering guaranteed only per subject / subscription (i.e. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
For Core NATS the ordering is guaranteed per publisher (connection): if a publisher uses a single connection to publish m1, m2, m3 then everyone subscribing to the subject(s) will see the messages in that order (there could be more than one publisher at the same time so their publications could get interlaced, but you will always see m2 after m1 and m3 after m2). This is true no matter what subjects the messages are published on (i.e. m1 m2 and m3 can be on any subject, the server processes the messages in the order it receives them from the client connection). |
Beta Was this translation helpful? Give feedback.
-
|
Yes for a single publish connection order will always be preserved globally. |
Beta Was this translation helpful? Give feedback.
Yes for a single publish connection order will always be preserved globally.