Handling Consumer Downtime in NATS JetStream Without Losing Messages #1829
Unanswered
dvl-numeez
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Designing a NATS JetStream System with Multiple Consumers in Go
I am designing a system using NATS JetStream, where a publisher sends messages to a specific subject. This part is straightforward. However, the challenge lies in handling consumers efficiently.
Requirements for Consumers
Challenges Faced
I initially used
nats.Durable()
to ensure consumers can fetch messages published during downtime. However, sincenats.Durable()
requires a unique name, each process needs a unique durable consumer name.The problem arises when:
Question
Can I achieve this desired behavior in NATS JetStream while using Go?
If so, what would be the best approach to persist the durable name so that when a process restarts, it resumes with the same durable name and retrieves the messages published during its downtime?
Any insights or suggestions would be greatly appreciated.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions