SpinGo/op-rabbit

Messages getting stuck in retry queue even though max retry count is not met

Opened this issue · 1 comments

Op-RabbitMQ version - op-rabbit-core_2.11-2.0.0.jar

We have in our ecosystem rabbitmq cluster with 2 nodes and close to 50 queues.
The RabbitMQ consumer code is same for all the queues however for certain queues the messages get stuck in the retry queue and not move back to the main queue though the number of retries is still not met.

Below is the recovery strategy:
val onAbandon: RecoveryStrategy = RecoveryStrategy.abandonedQueue(90.day, { q => s"boq.${queuename}" }, Nil, Exchange.default)
implicit val redeliver: RecoveryStrategy = RecoveryStrategy.limitedRedeliver(600.second, 10, onAbandon, q => s"retry.${queuename}", Nil, Exchange.default)

Message Consumption code:
channel(qos = qos) {
consume(Queue.passive(queue(s"${queuename}"))) {
(body(as[String]) & optionalProperty(TypedHeaderInt)) { (message, TypedHeader) =>

And while performing getMessage in RabbitMQ web plugin the Redelivery flag is solid dot for the messages that are stuck and also properties like
headers: x-death : count, exchange: queue, reason: are all missing.

Kindly help on how to debug this issue further

We are facing exactly similar issue.