Answer the question
In order to leave comments, you need to log in
How to get rid of message loss in RabbitMq?
Hello!
We have:
Answer the question
In order to leave comments, you need to log in
- Tune the rabbit config
- Tune the server config
- Monitor logs
- monitor server parameters (disk, percent, memory, simultaneous number of messages)
Stop using the fire and forget principle and control the fact of successful message delivery to the queue with exponential retry in the script
As Ivan mentioned, you need to start controlling the successful receipt of the RabbitMQ message, for which you need to enable a special mode on the send channel. The sending speed in this mode will, of course, be much lower, in order to somehow improve it (provided that the order of messages in the queue is not important), you can:
1) Open several channels and send them in parallel
2) Open a channel without sending confirmation and with confirmation, send, for example, 999 messages to the first one, and then one to the second one and wait until confirmation comes to the last one (something can go wrong, but it looks working).
Additionally, you can try the Lazy mode at the queue.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question