Mr T.
Mr T.

Reputation: 4508

consume queue from multiple vhosts with kombu

I have the following situation. I have a list of vhosts. In each vhost i have a queue (same name in all vhosts). Is there a way to simultaneously consume the queues? (i don't want to create a separate process for each vhost) I want to have a single consumer, consuming from all the queues.
I'm using kombu and rabbitmq.
Thanks

Upvotes: 1

Views: 529

Answers (1)

Gabriele Santomaggio
Gabriele Santomaggio

Reputation: 22712

Based on https://www.rabbitmq.com/uri-spec.html:

amqp_URI = "amqp://" amqp_authority [ "/" vhost ] [ "?" query ]

amqp_authority = [ amqp_userinfo "@" ] host [ ":" port ]

amqp_userinfo = username [ ":" password ]

username = *( unreserved / pct-encoded / sub-delims )

password = *( unreserved / pct-encoded / sub-delims )

vhost = segment

You need one connection for each vhost. So, no you can't.

And in general you can't have a single subscriber for multiple queues, even if they are in the same vhost

Upvotes: 1

Related Questions