corvus-ch / rabbitmq-cli-consumer

Consume RabbitMQ messages into any cli program
MIT License
236 stars 36 forks source link

Messages got stuck in unacknowledged #54

Closed rnkhouse closed 5 years ago

rnkhouse commented 5 years ago

When I run the consumer job some messages are getting cleared and some of them are getting stuck in unacknowledged. When I resume the job and restart it still those old messages are not cleared.

When I run the consumer job without rabbitmq-cli-consumer, all messages are acknowledged properly.

What could be the issue? I am using https://github.com/romainrg/rabbitmq_client/blob/master/libraries/Rabbitmq_client.php library.

I noticed that there is always 3 unacknowledged messages. These messages are not going away even if I restart the consumer job.

After I set prefetch count = 1 in the config, now there is 1 message in unacknowledged.