I'm working on a worker which is able to treat message from a RabbitMQ.
However, I am unsure of how to accomplish this.
If I receive a message and during my treating an error occurs, how can I put the message into the end of the queue?
I'm trying to using nack or reject, but the message is always re-put in the first position, and other messages stay frozen!
I don't understand why the message has to be put in the first position, I'm trying to "play" with other options like requeue or AllupTo but none of them seem to work.
Thank you in advance!
RabbitMQ always tries to keep the messages in the publication order.
If you want to put the received message at the back of the queue from the consumer then, send ack() back to rabbitmq server, RabbitMQ will remove the existing message who’s acknowledgement it's waiting for. Send the message data to the same queue, it will get put into the back of the queue.