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

"nats: message does not have a reply" - Ack/Nak spam #183

Closed
nuttert opened this issue Apr 4, 2024 · 4 comments · Fixed by #187
Closed

"nats: message does not have a reply" - Ack/Nak spam #183

nuttert opened this issue Apr 4, 2024 · 4 comments · Fixed by #187
Assignees
Labels
bug Something isn't working

Comments

@nuttert
Copy link

nuttert commented Apr 4, 2024

Hey! I got the spam after updating on the last version

3:24PM INF > error on ack message: "nats: message does not have a reply"

I see that subscribers use this logic:

acknowledgeableBrokerMessage.Ack()

I have an application that on one side uses Go(oapi + asyncapi) and on the other side there is another client/server that uses some broker natively, so the other side doesn't know the logic with acks, maybe I didn't understand the logic with acks/naks correctly , but I think this should be optional.

And it would be great if you add more about it in the Readme, thanks.

@lerenn lerenn added the bug Something isn't working label Apr 4, 2024
@lerenn lerenn self-assigned this Apr 4, 2024
@lerenn
Copy link
Owner

lerenn commented Apr 4, 2024

Hello ! Sorry about that :/

It should be optional, so I may have missed something on this.
I'll take a look on this as soon as I can.

@magraef, if you have any idea, please do not hesitate :)

@magraef
Copy link
Contributor

magraef commented Apr 4, 2024

@lerenn Sure i will take a loot at it.

@nuttert Just to be sure, you are using core NATS without jetstream right?

The general idea of the ack (acknowledgement) is to track the delivery and processing of a message from consumers to the broker and to trigger a redelivery of the message in the case of a nack.

@magraef
Copy link
Contributor

magraef commented Apr 5, 2024

If you could confirm that it's core NATS without Jetstream, it seems I misunderstood the NATS code documentation. From NATS Jetstream documentation i can see In this scenario, core NATS does not support ack() for messages, only Jetstream does.

Apologies for the confusion. I'm primarily accustomed to using Kafka and relied on the code documentation of natsio to implement the ack/nack mechanism. I will work on providing a fix and change the AcknowledgementHandler promptly.

In the meantime I would recommend to go back to the old version or if this is not wanted use the DummyLogger for the broker controller to get rid of the spam log messages.

It seems also that we dont see the log messages in our tests, because we do not configure a proper logger and run the test with the default DummyLogger.

@nuttert
Copy link
Author

nuttert commented Apr 5, 2024

Yes, I used the core NATS. By the way, after this problem I became interested in Jetstreams (acks is a really good feature) and found some problems with it, I will describe them in the next issue. And thanks for your quick replies!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants