Hi, I am trying to use the ProducerTemplate.requestBodyAndHeaders() method to send an EMS request message to an existing system.
Map<String,Object> headers = new HashMap<String, Object>(); headers.put("form_name","trade_version"); headers.put("JMSCorrelationID", "ID:positionIVCRequest"); headers.put("useMessageIDAsCorrelationID", "true"); Map<String,Object> queryParams= new HashMap<String, Object>(); queryParams.put("a","1"); queryParams.put("b", "2"); javax.jms.TextMessage returnObj = template.requestBodyAndHeaders("positionEMS:queue:Q.IVCREQUEST?" , queryParams, headers, javax.jms.TextMessage.class); This comes back with a JMS TextMessage reply that I can see in the Camel logs, but the function call itself always returns null. I can see the below warning in the logs: [Camel (CamelContextID) thread #4 - TemporaryQueueReplyManager[Q.FID.UK.GBB.DBD.CRD.IVCREQUEST]] WARN org.apache.camel.component.jms.reply.TemporaryQueueReplyManager - Reply received for unknown correlationID [ID:positionIVCRequest]. The message will be ignored: TextMessage={ Header={ JMSMessageID={ID:D1_LN_FID_UKB.4694520128E923DF44:4224} JMSDestination={Queue[$TMP$.D1_LN_FID_UKB.4694520128E924C303.1]} JMSReplyTo={null} JMSDeliveryMode={NON_PERSISTENT} JMSRedelivered={false} JMSCorrelationID={ID:positionIVCRequest} JMSType={null} Tried calling this both with a hard-coded correlation ID: headers.put("JMSCorrelationID", "ID:positionIVCRequest"); As well as with the useMessageIDAsCorrelationID flag set to true: headers.put("useMessageIDAsCorrelationID", "true"); Both failed to return a result. Is there anything else I need to set in the header? Thanks. -- View this message in context: http://camel.465427.n5.nabble.com/Request-response-using-ProducerTemplate-requestBodyAndHeaders-tp5736944.html Sent from the Camel - Users mailing list archive at Nabble.com.