Replies: 2 comments 8 replies
-
Subscriptions would failover automatically but at the moment there isn't lame duck support as of v2.1.2. Currently reconnect happens when a socket exception occurs. With back off, we try the next server in the list (or randomized, configurable with options) to connect to and send SUB messages to recreate the subscriptions made and registered in the same Also note that NATS core QoS is at-most-once (or fire-and-forget) meaning applications are responsible for recovering lost messages or loss must be acceptable for the use case. hope it helps. Please feel free to reply if I missed anything or have more questions. |
Beta Was this translation helpful? Give feedback.
-
@mtmk what's the workaround for LDM? We can capture the event. Should we just start a new connection? |
Beta Was this translation helpful? Give feedback.
-
I am currently running a piece of software that has 9 NATS pods for distributing data, no JetStream, just Core publish subscribe. and we run millions of messages per minute.
Currently we have our own connection failover logic, on the subscriber side, but is that really needed, or does the current failover logic ensure that we do not loose messages, when restarting the NATS (lame duck scenario).
I Have found it hard to find any descriptions on how reconnects works for Core pubsub in the NATS client.
Beta Was this translation helpful? Give feedback.
All reactions