Skip to content
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] JetStream: auto-ack callback ack handling #493

Merged
merged 1 commit into from
Dec 7, 2021
Merged

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Dec 7, 2021

If a message is already ack'ed (except for natsMsg_InProgress()),
the library should not attempt to ack the message when the
callback returns.
It is even more important if the user called natsMsg_Nak() since
if the callback ack'ed the message, it would defeat the purpose
of the Nak.

Resolves #492

Signed-off-by: Ivan Kozlovic ivan@synadia.com

If a message is already ack'ed (except for natsMsg_InProgress()),
the library should not attempt to ack the message when the
callback returns.
It is even more important if the user called natsMsg_Nak() since
if the callback ack'ed the message, it would defeat the purpose
of the Nak.

Resolves #492

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 4837e7e into main Dec 7, 2021
@kozlovic kozlovic deleted the fix_492 branch December 7, 2021 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JetStream: auto ack callback still acks message even if user called natsMsg_Nak(), etc..
2 participants