SpinGo / op-rabbit

The Opinionated RabbitMQ Library for Scala and Akka
Other
232 stars 73 forks source link

DeadLetter not recognised #175

Open martinevent opened 5 years ago

martinevent commented 5 years ago

I am using the RecoveryStrategy.limitedRedeliver strategy. I want it to send messages to the DLX i declared which is attached to a queue where failed messages are picked off. I keep getting this val exx: Exchange[Exchange.Direct.type] = Exchange.direct("op.dead") val onAbandon: RecoveryStrategy = nack(true) val redeliverDelay: FiniteDuration = .05.seconds implicit val recoveryStrategy = RecoveryStrategy.limitedRedeliver( retryCount = 1, exchange = exx, retryQueueName = retry => "tbd", onAbandon = onAbandon, redeliverDelay = redeliverDelay ) I have it set up as shown above. Is there something I am missing? I do not want a retry queue. I just want it to retry on the same queue, if it fails, I want it sent to the DLX rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-dead-letter-exchange' for queue 'tbd' in vhost '/': received none but current is the value 'op.dead' of type 'longstr', class-id=50, method-id=10)