Closed a-st closed 4 years ago
This is by design. If your goal is to dead letter via the default exchange, use amq.default
for exchange name.
rabbitmqadmin
and Access Control guide mention this, perhaps it should be added to the DLX guide.
Some basic tests and digging in the codebase suggest that the amq.default
alias is not applied to DLX values, so setting up dead lettering to the default exchange via UI forms is not possible.
We will retain the form behavior as you really do not want to send blank fields in every other case. Aliasing would have to be extended.
When using the RabbitMQ management UI to add/update a user policy, only definition with a non-empty value are actually sent to the API.
When using the API directly, definitions with emtpy values are preserved and work as expected.
Steps to reproduce
On the other hand, when using the HTTP API, e.g. with following cURL command, everything works as expected and entry for my-policy contains the definition dead-letter-exchange with empty value
I've tried to investigate this issue on my own and it looks like following function is causing this issue as it removes every key that has no value https://github.com/rabbitmq/rabbitmq-management/blob/74fbfbe6fcb449b141245ebfd2e4f4e5935e5a46/priv/www/js/main.js#L1360