Closed Roger closed 1 year ago
You can either await the result of basic_publish to wait for this specific confirm, or call wait_for_confirms to wait for all pending confirmations. wait_for_confirms returns the list of messages that were nacked or rejected. If the list is empty, all messages have been acked
On Wed 22 Jun 2022 at 20:23, roger @.***> wrote:
I'm trying to use confirm_select and wait_for_confirms to get the list of acked/nacked messages, but every time I call wait_for_confirms it returns an empty Vec, even in the example is checking is_empty after publishing some messages https://github.com/amqp-rs/lapin/blob/main/examples/publisher_confirms.rs#L108 .
With logs at trace level, I can see PublisherConfirm was ready but didn't carry a message, discarding that comes from https://github.com/amqp-rs/lapin/blob/main/src/returned_messages.rs#L149 so looks like the Ack doesn't carry any message.
Is there any way to know which published message was acked/nacked?
— Reply to this email directly, view it on GitHub https://github.com/amqp-rs/lapin/issues/369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWNXRAWHYU2PPQIZS236TVQNK2PANCNFSM5ZRHAUHA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
is wait_for_confirms
more efficient than wait for each result of basic_publish
? or internally is just waiting for each result?
The internal mechanism is the same, but wait_for_confirms will only wait for the last publish
On Thu 23 Jun 2022 at 11:07, roger @.***> wrote:
is wait_for_confirms more efficient than wait for each result of basic_publish? or internally is just waiting for each result?
— Reply to this email directly, view it on GitHub https://github.com/amqp-rs/lapin/issues/369#issuecomment-1164151849, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABWNXSPR5BBLRZMRYWLWCLVQQSMXANCNFSM5ZRHAUHA . You are receiving this because you commented.Message ID: @.***>
I'm trying to use
confirm_select
andwait_for_confirms
to get the list of acked/nacked messages, but every time I callwait_for_confirms
it returns an emptyVec
, even in the example is checkingis_empty
after publishing some messages.With logs at trace level, I can see
PublisherConfirm was ready but didn't carry a message, discarding
that comes from https://github.com/amqp-rs/lapin/blob/main/src/returned_messages.rs#L149 so looks like theAck
doesn't carry any message.Is there any way to know which published message was acked/nacked?