Thank you, @giri and @Aaron ,
My use case is as follows:
We have a single publisher where we can define a key to send data to a queue. I have two different clients, and based on the key or property, messages need to be routed to the appropriate consumer.
System A : Publisher 1
System B : Consumer 1
System C: Consumer 2
I explored partitioned queues and queue selectors, and I understand that selectors are not compatible with partitioned queues.
For Partitioned Queues:
I set the key for the message in the publisher using Solace-User-Property-JMSXGroupID. Since each partitioned queue can accommodate multiple keys, it balances messages across partitions evenly. While this preserves the message order, I noticed that the consumer binds to the partitions automatically. In this case, I am unable to route specific messages to a designated consumer as intended. I now understand that partitioned queues are ideal when there is a single client with multiple consumers, allowing autoscaling while maintaining message order for specific keys.
For Queue Selectors:
When using queue selectors, I can segregate messages to different consumers by setting the property in the publisher:
.with_property(“SystemName”,“B”)
In the consumer, I configured the selector as:
.with_message_selector(“SystemName= ‘B’”)
This allows the correct consumer to receive the messages. However, since the queue is non-exclusive, message order is not preserved.
Kindly correct me if there is anything wrong in my understanding.
Would be really helpful to know if this flow is possible or not ?