How to scale services listening to multiple exclusive queues.

Mallu Golageri
Mallu Golageri Member Posts: 3
edited August 5 in PubSub+ Event Broker #1

I have an application/service which listens to 10 exclusive queues(let's say we have 10 apache camel routes, each route is listening to one queue) where we are receiving the ordered messages in each queue. I want to scale this service upto 10 pods/instances incrementally. But now I want to have only 2 pods, each listening to 5 queues.

When I do the deployment with 2 replicas/pods, will each pod listens to exactly 5 queues ? How does this work?

Let's say pod1 tries to connect to all 10 queues and succeeds, what about pod2? How pods will be given active connection to the queues?

How does solace ensure that pod1 has only 5 active/primary connections with 5 queues(q1-q5) and pod2 has active connections with remaining queues(q6-q10)?

Also, I am assuming the pod1 will act as standby for remaining other queues.

If I have 10 queues & 5 pods/instances, each pod will be subscribed to 2 primary queues and 4 pods will act as standby, can I control this number? for example I want only 2 pods to be as standby consumer.


  • Mallu Golageri
    Mallu Golageri Member Posts: 3

    Can some one through some light on this?

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 848 admin

    Hi @Mallu Golageri ,

    With Solace Exclusive queues the first consumer to connect to each queue will receive the messages and the second will be standby on a per queue basis. This will most likely end up with the first app starting to be the primary consumer from all 10 queues. With the setup that you describe, the broker does not include logic to say "hey give this instance 5 and the other instance 5" so you'd have to build that into your app in some way. Of course there are several ways to do that….BUT before you go down that route if your publishers aren't already in production and you can still modify them you might consider using Partitioned Queues instead. From what you shared in your original post it sounds like it would fit your use case while providing an easier to manage and more robust solution for the future. 1 Partitioned Queue w/ 10 partitions & 2 consumers. The broker will then handle the balancing of partitions (which are actually each their own exclusive queue under the covers) across your consumers. AND if you eventually decide you need to add more consumers it will handle that for you as well.

    Check out the docs here:

    And @Aaron recently did some office hours here which are useful:

    Hope that helps!

  • Mallu Golageri
    Mallu Golageri Member Posts: 3
    edited August 8 #4

    @marc Thanks much for the response. This is exactly what we are looking for but unfortunately our org is not upgraded yet to have these features in the solace version that we 're using currently. Can we achieve the same without partitioned queues? Currently we 're on 10.0

  • PaulN
    PaulN Member, Employee Posts: 1 Solace Employee

    Hi Mallu - hope you can join us for our upcoming user group: