Can I bind a queue from a different vhost?
Asked Answered
B

1

7

I have an exchange with a vhost, user, etc from that exchange I bind different queues. The exchange and the queues are in the same vhost. Now I want to create a different vhost for a different queue but I cannot bind this new queue from the previous exchange as It is in different vhost.

What is the best solution for that? Thanks

Bartolomeo answered 5/4, 2017 at 11:30 Comment(0)
B
8

Your requirement is typically done using the federation or shovel plugins. For your requirement a federated exchange seems the more appropriate.

If I quote your question by naming vhost:

The exchange and the queues are in the same vhost A. Now I want to create a different vhost B for a different queue but I cannot bind this new queue from the previous exchange as It is in different vhost.

  • You create a federated exchange on vhost B
  • This exchange is linked to upstream exchange on vhost A
  • The new queue on vhost B is bound to this federated exchange.
Bejarano answered 5/4, 2017 at 13:2 Comment(8)
Thanks, This was my first option, to create a federation. Just wondering, do we have other options? As for example in my architecture we have already more than 10 federation just for this purpose..Bartolomeo
No as far as I know, vhosts are isolated namespaces. By curiosity, what is your use case?Bejarano
I have Internal rabbit with an exchange. then I have 10 federation each one for a different client and a different queue. I was wondering if It was possible to do in another way rather than all the time to federate.Bartolomeo
What is the purpose of having a vhost per client ? (if I understand correctly)Bejarano
so every client cannot see the queue of the others. different vhost/user for each client. Then every client has access to just one exchange and one queueBartolomeo
I conceive permission are not suitable for your use case. Thanks for this answerBejarano
so what do you think is the best solution? Thank you for all your answers and commentsBartolomeo
I will look first at permissions, like they control access to queues, a client can have permission to access to only its queues.Bejarano

© 2022 - 2024 — McMap. All rights reserved.