I am trying to consume the messages by a specific correlation ID. The JMS application that I talk to use CMQC.MQSO_SET_CORREL_ID
. What is the equivalent option available to XMS .Net framework to subscribe messages with specific correlation ID using managed subscription?
Asked
Active
Viewed 120 times
2
-
So they publish to a topic and message they send have a specific correlation ID? – JoshMc Oct 08 '20 at 17:29
-
That is right. The initial request that I sent has the message id and so when the response is sent from the other end, they are setting the correlation ID as the message ID. So I am looking for that id to be returned as the correlationID – Mini Oct 08 '20 at 20:04
-
But you are using pub/sub not standard queues? But to get to your question you would use a selector in XMS, this can be used either on a queue or a subscription. – JoshMc Oct 08 '20 at 22:22
-
Yes I am using pub/sub and trying to use the selector. The issue is Correlation ID read on subscription is not what is set from the sender(what is expected). It is getting set with the default Correlation ID from the queue manager – Mini Oct 09 '20 at 02:46
-
There is some trick to have CorrelationId preserved, I'll look for it. Which version of mq is the queue manager running and which version are the xms dlls from? – JoshMc Oct 09 '20 at 08:38
-
You need to set `DESTCORL(0)` on your subscription, this week cause MQ to pass on the original correlationID. – JoshMc Oct 09 '20 at 10:42
-
MQ Client Version 8.0.0.4 and Mq server version is 9.0 – Mini Oct 09 '20 at 17:30
-
Can the DESTCORL(0) Setting be done from Client application side? – Mini Oct 09 '20 at 17:38
-
I am not sure from a JMS client if or how you can set this, but I do know it can be set on a admin defined sub and also from other IBM MQ APIs. This article from Morag is a good general reference on the topic: [IBM MQ Little Gem #31: Publisher's CorrelId](https://community.ibm.com/community/user/imwuc/blogs/morag-hughson/2018/01/27/ibm-mq-little-gem-31-publishers-correlid). – JoshMc Oct 09 '20 at 19:03