Hi Santhosh, the JMS component lets you set `javax.jms.Destination` via the `destination` property on the endpoint; or you can use `destinationResolver` property on the endpoint or `JMSDestination` header value and implement `org.springframework.jms.support.destination.DestinationResolver` interface in which you would create the Destination and set the needed properties on it.
I don't believe, and the docs state this as well[1], that you can set destination properties via `CamelJmsDestinationName` header so I think that for your use case it would be best to go down the DestinationResolver route (check the docs for example). As I stated in the previous message, make sure that you set the headers on exchange.in message -- nice way of reasoning about it is that that is the _input_ to the JMS component, and check if any of the rules mentioned in the component documentation[2] might affect the value of your JMS property. You might also want to check if you've set a custom `headerFilterStrategy` on the endpoint, that might filter out the headers. zoran [1] http://camel.apache.org/jms.html#JMS-SettingJMSProviderOptionsontheDestination [2] http://camel.apache.org/jms.html#JMS-MessageFormatWhenSending On Fri, Feb 10, 2017 at 10:50 PM, santhoshks <santhoshks...@gmail.com> wrote: > Thank you Zoran... > > This is only the sample code which tries to publish message to IBM MQ and > sets the header. Actual application has much more in it. > > As per IBM specification, we need to do following but I am not sure how to > set MQMD properties in Camel. > > // 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 appIdentityData > jmsMessage.setStringProperty("JMS_IBM_MQMD_ApplIdentityData", > "MyApplIdentityData"); > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Unable-to-set-JMS-IBM-MQMD-ApplIdentityData-using-camel-tp5793781p5793783.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Zoran Regvart