IModel BasicPublish/WaitForConfirmsOrDie function never completes #1705
Replies: 3 comments 9 replies
-
Hello! I strongly suggest starting the process of migrating your code to the latest version 7 release candidate: https://www.nuget.org/packages/RabbitMQ.Client/7.0.0-rc.12 In addition, the next RC will include a new feature by which this library will track confirmations for you. The Having said all that, in your case, I recommend that you DO NOT use the |
Beta Was this translation helpful? Give feedback.
-
It is a bad advice recommending using a release candidate, especially because the OP is using Rabbit in production, as stated. And in such environments one must suggest using stable releases only. Moreover the event handlers approach may not be a valid alternative to the WaitForConfirms approach in all scenarios: for some use cases it is indeed required to wait for the confirm. This scenario is not covered by the event-driven approach, and even the tutorial you linked shows to use the WaitForConfirms one. |
Beta Was this translation helpful? Give feedback.
-
I'm aligned with my collegue @DPDmancul, we can't use a version that isn't production ready. Since the application requires that every message is sent inside a transaction we must be certain that the single message is received by the broken, since we can't lose any message. Also i have gave a look to the source code and the publish just writes into the socket, and the waitForConfirm uses a So i don't really understand what could lead to such issues. |
Beta Was this translation helpful? Give feedback.
-
In our production environment we often have spikes of thousands of data to read, process and publish individually to a rabbit broker.
Recently, as the data peaks have increased, it has happened that our publish function completely locks it self.
The client version is
6.8.1
We receive only the first log but the second never comes out. Every operation that uses the channel is protected by semaphores, so since the publish never completes, the semaphore is never released and everything is locked.
The strange thing is that there no exception, but we noticed, analyzing the rabbit server logs, that after like 2/3 seconds the connection get closed and reopened and still the function has never gets completed or faults. Also we have some other background service that only consumes and after the reconnection they seems to be able to consume messages but since the channel is protected by semaphore they aren't able to ack.
Sadly in our local enviroment, we were unable to reproduce the problem. We also tried to manually close the connection but that has genereted some exception as also trying to set to 0 the watermark.
Has somebody any ideas on which could be the problem?
Beta Was this translation helpful? Give feedback.
All reactions