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.

Configuration:

Attribute Description Default Value
zeroExpirationOverride When not zero will override the expiration date for messages that currently do not have an expiration set 0
ttlCeiling When not zero will limit the expiration time 0
futureOnly 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. false

You can include the TimeStampPlugin by adding the following to your ActiveMQ Broker configuration:

<plugins>
        <timeStampingBrokerPlugin/>
</plugins>

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.