I'm implementing an asynchronous request/response flow (using SI jms outbound-gateway) with IBM MQ where there separate request and response MQs. IBM MQ sets the Message ID of the JMS request so I'm trying to use the Correlation ID pattern to tie together request and response messages. From what I can tell, IBM MQ is setting the JMSCorrelationID on the response to be the hex encoded value of the request JMS correlation id. I believe this mismatch is causing the outbound gateway not to get the request message.
My outbound gateway is defined as such:
Upon invocation, i receive a response message on the 'reply-destination' queue, but it is never picked up and the thread subsequently times out.
I have a created a message converter that sets the correlation id on the request as such.. While i'm setting the JMSMessageID, it doesn't seem to matter because IBM MQ overwrites it with its own generated ID.
The response message has the following value for the JMSCorrelationID (hex and padded value of "123456").
BytesMessage byteMsg = session.createBytesMessage();
While I'm not certain, my guess is that the underlying Message Selector implemented by the outbound gateway is looking for and not
I'm not sure what options I have at this point as I can't seem to find a way to successfully correlate the request/response messages. Assuming the above is accurate, could I write a custom Message Selector that transforms the string correlation id to the hex equivalent? I just don't see anywhere to inject a custom message selector on the outbound gateway.
Any advise/options would be much appreciated!!!