Replies: 1 comment 2 replies
-
No, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm migrating to the 7.X version of the library
I'm trying to send messages in a similar way as https://github.com/rabbitmq/rabbitmq-dotnet-client/blob/main/projects/Applications/PublisherConfirms/PublisherConfirms.cs#L110-L171
But also I need to handle the BasicAck taking into account that it can execute with IsMultiple = true
When sending in batch I guess that getting the next sequence publish number will reduce throughput as it needs to do a request via network.
But I need to execute an external handler for each sent message (that is when the BasicAcksAsync). Previously I stored the seq number in a dictionary and when the basic ack arrived if it was multiple I was iterating over the previous sequence number in the dictionary to execute my external handler for the previous messages.
If I execute multiple tasks to send messages and getting the sequence number I can get the same seq. number multiple times right?
For example with this code, as we are starting multiple tasks, many of them can get the same sequence right?
The only way I see to make it work is to not use the BasicAckAsync as the point where I execute my handler, but do it after awaiting all the tasks. But maybe at this point not all the BasicACKs are yet executed?
Is there any other way I can do this?
Regards
Beta Was this translation helpful? Give feedback.
All reactions