Tried setting an IBM MQ custom property in JMS while sending messages. It doesn't work.
I'm looking for an equivalent of the following in JMS/Apache camel.
mQMessage.setStringProperty( "customProperty", "123" );
Tried the following 3 options:
1) exchange.getIn().setHeader( "customProperty", "123" );
2) exchange.getIn().setProperty( "customProperty", "123" );
3) mQQueueConnectionFactory.setStringProperty( "customProperty", "123" );
The following code to read the property throws error because the property doesn't exist it seems.
mQMessage.getStringProperty( "messageGlobalSequenceNumber" )
throws the following error:
com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2471'.
at com.ibm.mq.MQMessage.getProperty(MQMessage.java:5694)
at com.ibm.mq.MQMessage.getStringProperty(MQMessage.java:6949)
at com.ibm.mq.MQMessage.getStringProperty(MQMessage.java:6925)
...
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…