Set name for webstomp / stompjs temporary queues #7230
-
Hi! I just wanted to ask if it is possible to specify the name for the temporary auto-delete queues, which are bound to the destination when I subscribe to a webstomp queue/exchange. The reason is, that I would like to specify a fine graded JWT permission control, so I would like to give permission f.e. to "stomp-subscriptions-user123-channels-* and therefore I would like to call the temporary queue name not "stomp-subscription-randomstring", but "stomp-subscriptions-user123-randomstring". Is this possible? I looked through the available documentation, but couldn't find anything in the stompjs documentation (only the name of the subscription id, but not of the temporary queue name). Documentation: https://stomp-js.github.io/ Thank you so much! ❤️ |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Also asked here: https://stackoverflow.com/questions/75400042/rabbitmq-set-name-for-webstomp-stompjs-temporary-queues Here is the source code for the function that generates a queue name: Notice that it only auto-generates a name if the |
Beta Was this translation helpful? Give feedback.
Also asked here: https://stackoverflow.com/questions/75400042/rabbitmq-set-name-for-webstomp-stompjs-temporary-queues
Here is the source code for the function that generates a queue name:
https://github.com/rabbitmq/rabbitmq-server/blob/main/deps/rabbitmq_stomp/src/rabbit_stomp_util.erl#L368-L382
Notice that it only auto-generates a name if the
x-queue-name
header is NOT present. So, it looks like you can specify whatever name you'd like via that header. Here is the documentation for it:https://www.rabbitmq.com/stomp.html#d.ugqn