I have a WPS 188.8.131.52 instance configured to talk to a ActiveMQ instance using JMS import bindings. I have configured the resource adapter in the WAS admin console using the AMQ 5.2 resource files and created the connection factory and queue jndi entities
With this configuration in place, I'm able to successfully put a message to the target ActiveMQ qeueue
Now I wish to set the JMSExpiration property on the outbound message, so that if the message is not picked up within the defined time, it should expire and get automatically deleted from the queue. For this I used a mediation module and used the JMS Header node to set the value for the JMSExpiration property. But when I test this service, the expiration value of the jms message on ActiveMQ always shows 0
How do I resolve this ??
This topic has been locked.
Pinned topic Cant set JMSExpiration header property when connecting to ActiveMQ instance
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
GlenM 110000S9DC8 Posts
Re: Cant set JMSExpiration header property when connecting to ActiveMQ instance2012-04-06T04:44:40ZThis is the accepted answer. This is the accepted answer.After a little bit of more analysis, found that the IBM infocenter has a clear mention that not all JMS header fields can be updated directly, while the ones like JMSType, JMSDestinationMode, JMSPriority and JMSCorrelationID can be updated from the JMS Header Setter node in the mediation module.
Infocenter link --- _http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp?topic=%2Fcom.ibm.websphere.wps.doc%2Ftaghubs%2Fexport_binding.html_
We don't have the ability to set JMSExpiration directly (in fact no JMS application can set this value), its calculated at the time a message is sent based on the "time to live" specified. The "time to live" for an async request is derived from the request expiration value set through a qualifier. So you'd need to use an asynchronous invocation qualifier as below and specify the request time to live there.
This works correctly now and sets the JMSExpiration on the message put on an ActiveMQ queue