activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <>
Subject [jira] [Closed] (AMQ-2504) Synchronize time without modifying the system date.
Date Thu, 11 Aug 2011 19:42:27 GMT


Timothy Bish closed AMQ-2504.

    Resolution: Won't Fix

This is what an NTP server is for, a workaround is to use the BrokerTimeStampPlugin to update
the time stamp on messages as they are processed.

> Synchronize time without modifying the system date.
> ---------------------------------------------------
>                 Key: AMQ-2504
>                 URL:
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: JMS client
>            Reporter: Adam Walczak
>             Fix For: 5.6.0
> I have a proposal to create a global variable in ActiveMQ's internals which alters the
value of System.getCurrentMillis(). Thanks to this we should be able to synchronize clients
connected to a JMS server (equipped with an additional NTP server for example) with out modifying
their system dates.
> Scenario:
> 1. Servers system date is sync'ed with an NTP server.
> 2. Clients retrieve their time difference from the NTP server
> 3. The client set ActiveMq...setTimeDifferenceToServer(...)
> 4. Every call for system millis in ActiveMQ sources looks like this: System.getCurrentMillis()
+ ActiveMq...getTimeDifferenceToServer() 
> I think it also would be an good idea to wrapper the System.getCurrentMillis() in a internal
ActiveMQ method and never call it again directly. This would allow the above modifications
and perhaps a to transit to System.nanoTime() to indicate millis in the future which is far
more  accurate (getCurrentMillis() has a 0-20ms error range).

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message