egemenakturk
egemenakturk

Reputation: 375

Why message is not deleted in queue if there is a error after receiving a message in Rabbitmq

I am working on Rabbitmq. I am a newbie in this topic. I have a successful sender and receiver. I have no problem at that but I noticed that if there is a fail in code message stuck in a queue.

If I explain in detail, When I get the message from a queue, the message should be deleted. It should do not matter is there a fail or not. Because queue cant tells this message successfully processed or not. The queue just delivers right? So how the hell queue understands the program that there is a fail in code and keep the message. :D So I just receive the message again and again.

If u guys help me about the basics of Rabbitmq. I will be glad. Thx Have a good day all of u :D

Upvotes: 1

Views: 1942

Answers (1)

José M
José M

Reputation: 3509

Messages stay in queues until they are acknowledged, if a connection that was sent a message fails before the message is acknowledged, the message is not deleted and it's redelivered later.

In your case you may want to activate automatic acknowledgement

Upvotes: 1

Related Questions