Custom queue names when using STOMP subscriptions?

101 views
Skip to first unread message

Kim Hansen

unread,
Jan 21, 2015, 4:56:35 AM1/21/15
to rabbitm...@googlegroups.com
When using STOMP subscriptions, RabbitMQ automatically creates a queue called

stomp-subscription-xxxxxxxxxxxxxxxxxxx

where xxxxxxxxxxxxxxxxxxx is an RabbitMQ-auto-generated string.

Is it possible to customize how RabbitMQ creates these names?

I would like to be able to have RabbitMQ create these names as:

stomp-subscription-<USERNAME>-xxxxxxxxxxxxxxxxxxx

so that Operations Team can identify the queues for a specific user. Our user-names consists only of A-Z0-9, so no special characters here.

Michael Klishin

unread,
Jan 21, 2015, 7:19:25 AM1/21/15
to Kim Hansen, rabbitm...@googlegroups.com
On 21 January 2015 at 12:56:36, Kim Hansen (kim...@gmail.com) wrote:
> Is it possible to customize how RabbitMQ creates these names?

Unfortunately that's not possible for destinations that declare queues on the fly. But there are
multiple destinations to choose from, including /amq/queue which can use a queue you declare
using a "regular" RabbitMQ client, which can have any name.

See Destinations on http://www.rabbitmq.com/stomp.html.
--
MK

Staff Software Engineer, Pivotal/RabbitMQ

Kim Hansen

unread,
Jan 21, 2015, 3:20:33 PM1/21/15
to rabbitm...@googlegroups.com, kim...@gmail.com
But then I need to specify one queue per user manually, right?

The problem is that in RabbitMQ I don't know how many users can/will connect, since user registration/authentication/... is done in backend database outside of RabbitMQ.

It would be really awesome if it was possible to create a template-name like: "stomp-subscription-${username}-${auto-generated-value}".

Michael Klishin

unread,
Jan 21, 2015, 3:25:43 PM1/21/15
to Kim Hansen, rabbitm...@googlegroups.com
On 21 January 2015 at 23:20:37, Kim Hansen (kim...@gmail.com) wrote:
> But then I need to specify one queue per user manually, right?

Correct.

> The problem is that in RabbitMQ I don't know how many users can/will
> connect, since user registration/authentication/... is done
> in backend database outside of RabbitMQ.
>
> It would be really awesome if it was possible to create a template-name
> like: "stomp-subscription-${username}-${auto-generated-value}".

If we hear enough people ask for this feature, we'll consider it.

Kim Hansen

unread,
Jan 22, 2015, 3:43:28 AM1/22/15
to rabbitm...@googlegroups.com, kim...@gmail.com
If we hear enough people ask for this feature, we'll consider it.

It would be really great if you would. Our operations team would really, really much like to be able to see username of each of them. Otherwise we might need to create some kind of API to loop through all these (50.000 - 200.000) to find out what belongs to whom.

+1 for this :-)

Michael Klishin

unread,
Jan 22, 2015, 7:19:59 AM1/22/15
to Kim Hansen, rabbitm...@googlegroups.com
If your system depends on username being a part of queue name/associated with it, why not explicitly name your queue and consume using /amq/queue/* destinations?

This way you get to choose what the naming scheme is and don't have to wait for a new feature release.

MK
Reply all
Reply to author
Forward
0 new messages