I use Python api to insert message into the RabbitMQ,and then use go api to get message from the RabbitMQ.
Key 1: RabbitMQ ACK is set false because of performance.
I insert into RabbitMQ about over 100,000,000 message by python api,but when I use go api to get message,I find the insert number of message isn’t equal to the get number.The insert action and the
get action are concurrent.
Key 2:Lost message rate isn’t over 1,000,000 percent 1.
Insert action has log,python api shows that all inserted message is successful.
Get action has log,go api shows that all get message is successful. But the number isn’t equal.
Question1:I don’t know how to find the place where the message lost.Could anyone give me a suggestion how to find where the message lost?
Question2:Is there any strategy to insure the message not lose?
In order for you to test that all of your messages are published you may do it this way:
channel.confirm_delivery()
. This will basically return a boolean if message was published. Optionally you may want to use mandatory
flag in basic_publish
.basic_publish()
methods returnes True.no_ack = False
This will give you an idea where your messages are getting lost.