Deleting durable consumers when calling Drain() #1110
britishdan
started this conversation in
General
Replies: 1 comment 1 reply
-
We have been reviewing these things internally and have been working on some updates. For background, if the app creates the durable through a Subscribe call the code makes the assumption that if you unsubscribe or drain you want it to go away. You can fix this by calling AddConsumer and then binding the subscribe to the durable consumer in your code. Thanks for the feedback! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey!
We were (very) surprised to find out that when calling
Drain()
, the nats client deletes durable consumers that it created duringQueueSubscribe()
.It took us a good couple of days to figure out why our durable consumers were "disappearing" 🙈
I was wondering what the reason is for this behavior?
It seems counter intuitive to us.
We assumed that
Drain()
would stop consuming messages, but not delete consumers, especially durable consumers.Thank you.
Beta Was this translation helpful? Give feedback.
All reactions