I am writing application that uses STOMP for communication. Server side is written using Spring Boot 2.1.7 and as external broker RabbitMQ 3.7.1 is used. On client side, I am using StompJS.
When client subscribes to user destination, eg. /user/queue/some-queue Spring will map it to /queue/some-queue-{sessionID} and RabbitMQ creates queue with corresponding name.
On subscription I added header {'auto-delete': true}, as specified here RabbitMQ Stomp Docs, and that created auto delete queue in RabbitMQ.
Problem comes when I try sending message to user as
simpTemplate.convertAndSendToUser('user', '/queue/some-queue', message)
Spring correctly translated queue name, but rabbitmq responds with error
PRECONDITION_FAILED - inequivalent arg 'auto_delete' for queue
What can I do to fix this issue?