-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NATS Message Consumption Issue After Pod (NATS cluster) Restart in OpenShift #6025
Comments
Please can you provide |
Stream info `? Select a Stream lpn
Options:
Limits:
Maximum Per Subject: 100,000 Cluster Information:
State:
|
Consumer info `Information for Consumer lpn > regEnCntrStasHdler created 2024-10-08T23:38:49-05:00 Configuration:
Cluster Information:
State: Last Delivered Message: Consumer sequence: 27 Stream sequence: 133 Last delivery: 1h56m11s ago |
Can you please provide resolution for the issue ? |
I have also faced this issue with 1 replica pod (non clustered) , WQ stream with no message limitation and no ttl. |
Observed behavior
NATS Alpine image (NATS 2.10.19) with Jetstream enabled is deployed in a three-node cluster within a Red Hat OpenShift environment. A headless service is exposed for applications deployed in the same OpenShift cluster to connect.
Whenever the NATS cluster pods are restarted with a rolling update, the connected application can publish messages successfully but is unable to consume them. The application client must be restarted on their end to resolve this issue. Can you please provide a resolution for this problem?
The application client (Java) uses the following seed URLs to connect to the NATS cluster for publishing and subscribing to messages:
nats://nats-0.nats-headless.ws-nats:4222,nats://nats-1.nats-headless.ws-nats:4222,nats://nats-2.nats-headless.ws-nats:4222
The NATS server in the cluster uses the following URLs in the nats-server.config to form the cluster:
nats://nats-0.nats-headless.ws-nats:6222,nats://nats-1.nats-headless.ws-nats:6222,nats://nats-2.nats-headless.ws-nats:6222
Expected behavior
The application should maintain its connection to the NATS cluster without needing to restart, even when pods are restarted or updated.
The application should be able to publish messages to the NATS cluster successfully during and after the rolling updates of the pods.
The application should be able to consume messages from the NATS cluster without interruption, receiving any messages that were published while it was connected.
If a connection is lost due to a pod restart, the client should automatically attempt to reconnect to the NATS server.
Server and client version
NATS Alpine image (NATS 2.10.19)
NATS Java client.
Host environment
RedHat OpenShift (on-premise)
Steps to reproduce
No response
The text was updated successfully, but these errors were encountered: