-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[FIXED] Notifying waiting pull consumers on consumer or parent stream deletion. #3605
Conversation
Signed-off-by: Derek Collison <[email protected]>
d916691
to
72ff2ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
if o.mset == nil || o.outq == nil || o.waiting.len() == 0 { | ||
return | ||
} | ||
hdr := []byte("NATS/1.0 409 Consumer Deleted\r\n\r\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't need to send the pending msgs/bytes in this case since the consumer is deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is correct, but should we add it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, since the consumer is really gone, I am not sure what the library will do with the extra info, but we could just to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True but we would want to surface consumer deleted IMO, not subscription closed etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I don't think we need to add, but we could, up to you.
if o.mset == nil || o.outq == nil || o.waiting.len() == 0 { | ||
return | ||
} | ||
hdr := []byte("NATS/1.0 409 Consumer Deleted\r\n\r\n") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, since the consumer is really gone, I am not sure what the library will do with the extra info, but we could just to be consistent.
Signed-off-by: Derek Collison [email protected]
Resolves #3603
/cc @nats-io/core