AnsweredAssumed Answered

How to set a response JMS message custom property with the value from a response JMS message header.

Question asked by AleGaz on Jun 28, 2017
Latest reply on Jun 29, 2017 by AleGaz

Hi all,


it's something similar to


but it's a different need anyway:


I'm working on a JMS communication based service where messages have headers, properties and xml body.
The service receives a message from a queue, creates a response xml and sends the message (with other headers and properties) on another queue.


How could I set a new property on the response that is equal to the response JMS Timestamp header itself (msg.timestamp)?
Something similar to msg.props.myTimestamp = {{=msg.timestamp}}.


So I need msg.props.myTimestamp be exactly equal to msg.timestamp, but just to know: how could I set msg.props.myTimestamp to current timestamp in milliseconds?


I've tried all the following ways without good results:


- timestamp.getTime()
- date.getTime()
- System.currentTimeInMillis().


Thank you and
Best Regards,