-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Describe the bug
Hello dear programmers,
If I try to receive a message from a queue which is bound to a fanout dead letter exchange (no binding key used), the following error occures:
"amqp:internal-error: array decoding not implemented for 0xd1"
My guess is that it has something to do with the additional message header information which gets attached to a message when it is dead lettered to the exchange. Maybe the rabbitmq-amqp-go-client cannot decode these correctly?
Thank you and best regards
Reproduction steps
- Declare 2 fanout exchanges with the following names: exchange-1 and dead-letter-exchange-1
- Declare a quorum queue with the name queue-1. Set the DeadLetterExchange-Parameter to dead-letter-exchange-1 and the DeliveryLimit to 1
- Declare a quorum queue dead-letter-queue-1
- Bind exchange-1 to queue-1 without a binding key since we are using a fanout exchange
- Bind dead-letter-exchange-1 to dead-letter-queue-1, also without a binding key
- Create a publisher with the NewPublisher()-function and set the amqp.ITargetAddress-Parameter to &amqp.ExchangeAddress{Exchange: "exchange-1"}
- Publish a message with the publisher from step 6. to the exchange exchange-1
- Go to the rabbitmq management UI -> Queues and Streams -> click on queue-1 -> scroll down to Get messages -> click the Button Get message 2x, meaning that the message will be requeued two times and therefore dead-lettered to the exchange dead-letter-exchange-1. You should now see that a message has been delivered to the queue dead-letter-queue-1
- Create a consumer with the NewConsumer()-Function and set its queueName-Parameter to dead-letter-queue-1
- Try to consume the message
deliveryContext, err := consumer.Receive(context.Background()) - Try to accept the message
deliveryContext.Accept(context.Background)-> error happens
Expected behavior
After calling consumer.Receive() I expect to receive the dead-lettered message from the queue dead-letter-queue-1
Additional context
I can receive the message normally through the management UI, but not through the library. I can consume from any other queue perfectly fine with the library. The bug only seems to happens when I try to receive messages with the library from a queue which is bound to a dead letter exchange.