Trying to figure out the camel/Spring configuration to set ApplicationIdData using JMS.
I know the java way to do it as below, I set MQOO_SET_IDENTITY_CONTEXT using below
int putOptions = MQConstants.MQPMO_SET_IDENTITY_CONTEXT;
pmo.options =putOptions;
and then i set applicationIdData as:
MQMessage msg = new MQMessage();
msg.applicationIdData = "SomeId";
msg.writeString(qmessage);
queue.put(msg, pmo);
Question is, How do I set applicationIdData using JMS/camel/Spring configuration. Below is my current camel configuration.
<bean class="org.apache.camel.component.jms.JmsComponent" id="jmsConnection">
<property name="connectionFactory" ref="mqConnectionFactoryWrapper" />
<property name="acknowledgementModeName" value="AUTO_ACKNOWLEDGE" />
</bean>
<bean id="connectionFactory" class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="hostName" value="${HOSTMNAME}" />
<property name="port" value="${PORT}" />
<property name="queueManager" value="${MQ_QMNAME}" />
<property name="channel" value="${MQ_INTERNAL_CHANNEL}" />
<property name="transportType" value="1" />
<!-- Transport type 1 means pure TCP/IP without any local client -->
</bean>
<bean id="mqConnectionFactoryWrapper"
class="org.springframework.jms.connection.CachingConnectionFactory">
<property name="targetConnectionFactory" ref="connectionFactory" />
<property name="sessionCacheSize" value="500" />
</bean>
<bean id="jmsTransactionManager"
class="org.springframework.jms.connection.JmsTransactionManager">
<property name="connectionFactory" ref="mqConnectionFactoryWrapper" />
</bean>
<bean id="PROPAGATION_REQUIRES_NEW"
class="org.apache.camel.spring.spi.SpringTransactionPolicy">
<property name="transactionManager" ref="jmsTransactionManager" />
<property name="propagationBehaviorName" value="PROPAGATION_REQUIRES_NEW" />
</bean>
I have gone through below links, couldnt find the right answer
http://forum.spring.io/forum/spring-projects/integration/jms/97168-how-to-set-wmqconstants-wmq-mqmd-read-enabled-in-spring
http://www.ibm.com/support/knowledgecenter/SSFKSJ_7.0.1/com.ibm.mq.csqzaw.doc/jm41030_.htm
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032010_.htm