Hi, we are trying to set specific MQ headers on a message that is required by
the receiver. In particular we are trying to do what is specified in this MQ
documentation:
http://publib.boulder.ibm.com/infocenter/wmqv7/v7r0/index.jsp?topic=%2Fcom.ibm.mq.csqzaw.doc%2Fjm41030_.htm
In particular it calls for this code, but we don't know how/where we could
implement this:
/* ---------------------------------------- */
// Enable MQMD write
dest.setBooleanProperty(WMQConstants.WMQ_MQMD_WRITE_ENABLED, true);
// Optionally, set a message context if applicable for this MD field
dest.setIntProperty(WMQConstants.WMQ_MQMD_MESSAGE_CONTEXT,
WMQConstants.WMQ_MDCTX_SET_IDENTITY_CONTEXT);
// On the message, set property to provide custom UserId
msg.setStringProperty("JMS_IBM_MQMD_UserIdentifier", "JoeBloggs");
// Send
/* ---------------------------------------- */
We are using camel 2.10 with spring XML. The way we are sending messages is
simple, the route is just like (for example):
<route>
<from uri="(reads a test message from a file and places the contents
in the Exchange body)"/>
<to uri="testjms:queue:testqueue"/>
</route>
...
testjms is configured as a bean like so:
<bean id="testjmsConfig"
class="org.apache.camel.component.jms.JmsConfiguration">
<property name="connectionFactory"
ref="atomikosTestConnectionFactory" />
<property name="transactionManager"
ref="JtaTransactionManager"/>
</bean>
<bean id="testjms" class="org.apache.camel.component.jms.JmsComponent">
<property name="configuration" ref="testjmsConfig" />
</bean>
This set up works for the basic putting of messages on the queue. So I was
hoping we could just set headers on the camel Exchange object and that would
automatically be translated to the MQ headers. But they didn't get passed on
that way. So how do we set those headers?
Hope I have provided enough info. Thanks
--
View this message in context:
http://camel.465427.n5.nabble.com/camel-jms-setting-specific-MQ-headers-tp5722102.html
Sent from the Camel - Users mailing list archive at Nabble.com.