Architecting multi queue / multi topic subscriber component
Need your input around what solace team advises in terms of best practices.
We have a java app/service that runs independently. It subscribes to multiple topics(both solcache and normal solace topics) and multiple queues. The multiple topics and queues are the messages published by other services/apps.
As per this thread https://solace.community/discussion/77/subscribe-to-multiple-topics-inside-same-session , The topic dispatcher feature isnt available in JCSMP library atm. This limitation would apply to multi queue subscribe as well, as a new consumer is created and previous one closed by the FlowReceiver too.
To get around this should we:
1) Write our own TopicDispatch functionality based on bytesXMLMessage.getDestination().getName() ? Incase of queues there is an added complexity in that this method returns the name of the topic( mapped to the queue we are subscribing on) that this msg was published on rather than the queue name.
2) Create a seperate JCSMP session(TCP Connection) for each topic and queue that we subscribe to ? We are looking at about a dozen connections for each of our apps. So about 150(max) tcp connections to our solace VPN which atm allows a max of 500 connections.
3) Get all our topics and queues mapped to a single/fewer queues and then do a message dispatch based on the value set in bytesXMLMessage.getApplicationMessageType() ?
4) Any other more elegant ways to tackle this ?