unique topic subscription id ?
Is there a unique subscription id generated when we do a subscribe request to a topic (similar to a cache request id) ?
Topic solaceTopic = JCSMPFactory.onlyInstance().createTopic("abc/topic");
session.addSubscription(solaceTopic);
If I can get or add a unique id for the subscription above which would be part of the received messages then I can do a performant routing of messages internally in our app.
I appreciate that it might not be possible but asking just incase.
Many Thanks,
Ali
Comments
-
Hi @alinaqvi,
Can you share more about what problem you're trying to solve? There is no given unique id when you add a subscription, however each message has adestination
property where you can see what topic it was published to.0 -
Hey marc,
I am just trying to route messages(in our app internally) where I have subscribed to multiple topics within the same solace session. So basically trying to implement the missing 'topic dispatcher' functionality ourselves.
For solcache topics I can use the cacheRequestId so I just wanted to know if its possible for normal topics.
I guess not. Thanks for your quick reply.0 -
@alinaqvi We have topic dispatch within some of our APIs: e.g. Our C and .Net APIs. It isn't support in the Java API , which appears to be the one you're using. As Marc says, you can interrogate and route messages based on the destination header property.
1