The documentation for session.getMessageConsumer() says:
"
NOTE: For a given JCSMPSession, this method returns a new XMLMessageConsumer object on each call, closing the existing consumer if it exists.
"
So basically what happens is that at the last consumer that you start will be the active one. This will receive msgs for all registered topics so far. Right now I have a privately held list of listeners that I map to the topic name/s. When I receive a new message from solace I check what topic it was sent on and then call the appropriate listener/s.
What I would ideally like to do is use solace API similar to pseudo-code below:
session.registerForTopicUpdates(“abc/topic1” , XMLMsgListener1 )
session.registerForTopicUpdates(“abc/topic2” , XMLMsgListener2 )
…