You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After the NATS client reconnects, the sequence number does not match the expected sequence. The log shows a mismatch between the stored sequence number and the sequence number received from NATS. Here is an example from the logs:
2024/01/26 00:51:54 stored sequence: 34702749
2024/01/26 00:51:54 sequence from nats: 34702750
2024/01/26 00:51:54 NATS disconnected due to: read tcp 10.143.*->135.148.*: read: connection reset by peer, will try reconnecting
2024/01/26 00:51:54 NATS reconnected [nats://*.nats.backend:4222]
2024/01/26 00:51:55 stored sequence: 34702750
2024/01/26 00:51:55 sequence from nats: 34703172
Expected behavior
The expected behavior is that the sequence number should remain consistent and accurate after a reconnection. The NATS client should properly track and update the sequence number even after disconnections and reconnections
Server and client version
v1.32.0
Host environment
No response
Steps to reproduce
Connect to NATS using the provided code snippet.
Simulate a NATS disconnection (e.g., by restarting the NATS server or interrupting the network connection).
Observe the sequence number before and after the reconnection.
However, that is just to confirm the situation you see:
Server send the missing messages while the client was disconnected. Those missing messages will get redelivered as soon as their AckWait duration wil expire.
Observed behavior
After the NATS client reconnects, the sequence number does not match the expected sequence. The log shows a mismatch between the stored sequence number and the sequence number received from NATS. Here is an example from the logs:
Expected behavior
The expected behavior is that the sequence number should remain consistent and accurate after a reconnection. The NATS client should properly track and update the sequence number even after disconnections and reconnections
Server and client version
v1.32.0
Host environment
No response
Steps to reproduce
The text was updated successfully, but these errors were encountered: