The TimeStampPlugin is a Broker interceptor which updates a JMS Client's timestamp on the message with a broker timestamp.
This can be useful when the clocks on client machines are known to not be correct and you can only trust the time set on the broker machines.
Enabling this plugin will break JMS compliance since the timestamp that the producer sees on the messages after as send() will be different from the
timestamp the consumer will observe when he receives the message. This plugin is not enabled in the default ActiveMQ configuration.
When not zero will override the expiration date for messages that currently do not have an expiration set
When not zero will limit the expiration time
If set to true will never set the message time stamp and expiration time to a lower value than the original values. If set to false, they will always be updated.
You can include the TimeStampPlugin by adding the following to your ActiveMQ Broker configuration:
Note: In case the consumer’s local clock is running ahead of the broker’s local clock, messages might not be consumed by your consumer when this plug-in is loaded with default configuration. The consumer could perceive the messages as already expired.
If the clock difference between broker and consumer is greater than the message expiration time and if the consumer’s clock is running ahead, then make use of futureOnly=”true”. The following blog post has more details.