-
Notifications
You must be signed in to change notification settings - Fork 621
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
Publish method does not return "confirms.Published" counter(deliveryTag) #476
Comments
confirms.Published
counter(deliveryTag)
I was wondering the same, until I remembered that confirmations are sent on the channel where I publish, only for what I publish on that channel... ie. confirmation notification with DeliveryTag=1 is for the first message you published on the channel, etc... It's easy to keep track of it (but I agree, Publish could have returned that counter). |
@chrisDeFouRire I am worried about maintaing the same counter which might have concurency issue. How about adding a method like Java client has. |
@kamal-github I like your solution, though I can only give it my vote 👍 |
This client uses a really conservative approach when it comes to even theoretically breaking public API changes. Exposing a sequence counter reader — is the way to go. |
Please submit a PR that introduces a new function that returns the counter, or a doc update if it already exists. Breaking |
@michaelklishin I think that's exactly what PR #478 (by kamal-github) does |
@michaelklishin As @chrisDeFouRire mentioned that #478 I have already created the PR for this. Please review. :) |
When merging it. #478 |
When merging it |
For everyone who reaches this thread now, note that it was fixed in #478 (but not released yet) and the exact same commit was released in |
I have a listener registered through
NotifyPublish
and it is asynchronously getting confirmation and if ack=false then I republish the message or act upon it, but I get delivery tag from this listener channel and I do not know which payload this delivery tag is of.While looks like we can return the https://github.com/streadway/amqp/blob/v1.0.0/confirms.go#L36 which looks like the delivery tag for the given channel, but we are ignoring it in Publish method https://github.com/streadway/amqp/blob/v1.0.0/channel.go#L1360.
The text was updated successfully, but these errors were encountered: