Skip to content

[10.x] Dead Letter exchange flags cause errors when message is rejected #301

Closed
@SlayerBirden

Description

@SlayerBirden
  • Laravel Version: 6.x
  • Package Version: 10.1.3
  • RabbitMQ Version: 3.6.16

Describe the bug
Probably connected to #299. pushRaw now declares queue with 2 additional options: x-dead-letter-exchange and x-dead-letter-routing-key. However it specifies the queue itself as the value for those.
Based on the doc (https://www.rabbitmq.com/dlx.html) the message would be routed using exchange/key to another queue(s) if it's "nack'd", failed because of timeout etc. Not sure what was the idea behind assigning queue itself as a destination. It results in errors when messages are rejected due to Exceptions: something like

operation basic.reject caused a channel exception precondition_failed: unknown delivery tag 1.

What happens - is after reject message is redirected to Dead Letter exchange - which is... the same queue. So it's consumed again resulting in that error.

I don't think Dead Letter exchange functionality should be part of "default" setup. Otherwise it needs to be implemented properly.

Steps To Reproduce
Just dispatch new message to RabbitMq.
Expected behavior
Dead letter exchange is not used.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions