Hey there @mystarrocks …! Thanks for that very detailed and well-thought-out question. I have to admit, I’m not 100% sure on multiple dispatches-per-queue. Short answer: I’m pretty sure no. If you really want to have multiple topic subscriptions added to a single queue, and have those get different callbacks, I think you have to roll your own. I’ll go double-check anyhow.
But I wanted to respond to some of your other points/comments as I think they may be important? Maybe you know all this already…!?
Topics and Selectors in Solace are very different things, in terms of how routing is achieved and performance and such. Topics are like an IP packet dest header, and subscriptions are like a subnet mask; Selectors are more like looking inside the packet for user data or payload info to help do filtering. (rough analogy). Topics matching is MUCH faster in the broker than Selectors, so if possible to publish your messages with descriptive, multi-level topics that don’t need Selectors, that’s good.
Why not have two queues, each with their own subscription?
Having the (messaging) API add subscriptions to a queue is a little bit different than administratively adding it. Biggest diff is permissions: a client app needs to either be the “owner” of a queue, or the queue’s permissions must be set to at least “modfy topics”. Often, in production, broker administrators will lock down client permissions (so a rogue app can’t go around creating 100s of random queues), and pre-configure all queues with their required topics beforehand, and then apps just connect/bind to queues (queue permission == consume) and apps just get what’s in them. Generally considered safer than letting apps create queues and/or modify topic subscriptions on queues at their fancy.
In terms of overlapping topic subscriptions (or selectors) on the same endpoint, you’ll only get one message. If you have two queues, bound to each, with overlapping subscriptions, then it’s possible to get double messages.
Hope that helps! I’m assuming you are already playing with the Java API? What have been your observations so far?