You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by simevans <si...@cisco.com> on 2010/10/25 07:04:46 UTC

timeToLive with out of sync clocks

We are using activemq 5.3.2. We noticed our subscriber does not receive
messages when the clock on the subscriber is out by more that the timeToLive
that the producer.
For example, if the producer sends with a 2 minute time to live, and the
subscriber is on a machine where the clock is 2 minutes ahead, the
subscriber does not receive the message. If the clocks are put in sync the
subscriber receives the message ok.
Is this the expected behavior?
Is there a way to have the timeToLive work in a way that does not depend on
producer and subscriber clocks being in sync (since we don't have control
over the environnent clocks)?
Thanks
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p3009739.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: timeToLive with out of sync clocks

Posted by Rob Davies <ra...@gmail.com>.
Have you looked at the timestampPlugin - http://activemq.apache.org/timestampplugin.html ?

On 25 Oct 2010, at 06:04, simevans wrote:

> 
> We are using activemq 5.3.2. We noticed our subscriber does not receive
> messages when the clock on the subscriber is out by more that the timeToLive
> that the producer.
> For example, if the producer sends with a 2 minute time to live, and the
> subscriber is on a machine where the clock is 2 minutes ahead, the
> subscriber does not receive the message. If the clocks are put in sync the
> subscriber receives the message ok.
> Is this the expected behavior?
> Is there a way to have the timeToLive work in a way that does not depend on
> producer and subscriber clocks being in sync (since we don't have control
> over the environnent clocks)?
> Thanks
> -- 
> View this message in context: http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p3009739.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: timeToLive with out of sync clocks

Posted by Tim Bain <tb...@alumni.duke.edu>.
I just read your other message where you indicate you're already aware of
the TimeStampPlugin, so disregard that suggestion.

On Fri, Oct 3, 2014 at 12:44 PM, Tim Bain <tb...@alumni.duke.edu> wrote:

> The TimeStampPlugin (http://activemq.apache.org/timestampplugin.html)
> will allow broker clocks to override the JMS timestamp on the message,
> ignoring faulty client clock; is that what you're looking for?
>
> Note that "timeToLive" in ActiveMQ generally refers to the number of
> brokers a message is allowed to traverse before being delivered to an end
> consumer; I think you're talking about message expiration instead, hence
> the suggestion above about the TimeStampPlugin.
>
> On Wed, Oct 1, 2014 at 2:53 PM, coryplusplus <co...@gmail.com>
> wrote:
>
>> Was a solution ever found for this particular problem. I am experiencing
>> the
>> exact same scenario.
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p4686072.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>
>

Re: timeToLive with out of sync clocks

Posted by Tim Bain <tb...@alumni.duke.edu>.
The TimeStampPlugin (http://activemq.apache.org/timestampplugin.html) will
allow broker clocks to override the JMS timestamp on the message, ignoring
faulty client clock; is that what you're looking for?

Note that "timeToLive" in ActiveMQ generally refers to the number of
brokers a message is allowed to traverse before being delivered to an end
consumer; I think you're talking about message expiration instead, hence
the suggestion above about the TimeStampPlugin.

On Wed, Oct 1, 2014 at 2:53 PM, coryplusplus <co...@gmail.com> wrote:

> Was a solution ever found for this particular problem. I am experiencing
> the
> exact same scenario.
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p4686072.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

Re: timeToLive with out of sync clocks

Posted by coryplusplus <co...@gmail.com>.
Was a solution ever found for this particular problem. I am experiencing the
exact same scenario.



--
View this message in context: http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p4686072.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: timeToLive with out of sync clocks

Posted by simevans <si...@cisco.com>.
Thanks,
I did try putting in the timestamp plugin. It did not seem to fix the
problem.

to reproduce: use a broker and a producer on one box with the correct time.
use a subscriber on another box with a clock 3 minutes ahead. producer sends
a message with a TTL of 2 minutes, and subscriber does not receive it.
-- 
View this message in context: http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p3013026.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: timeToLive with out of sync clocks

Posted by Dejan Bosanac <de...@nighttale.net>.
Hi,

you can add timestamp plugin
(http://activemq.apache.org/timestampplugin.html), which will sync the
message with the broker's time.

Cheers
--
Dejan Bosanac - http://twitter.com/dejanb

Open Source Integration - http://fusesource.com/
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net



On Mon, Oct 25, 2010 at 7:04 AM, simevans <si...@cisco.com> wrote:
>
> We are using activemq 5.3.2. We noticed our subscriber does not receive
> messages when the clock on the subscriber is out by more that the timeToLive
> that the producer.
> For example, if the producer sends with a 2 minute time to live, and the
> subscriber is on a machine where the clock is 2 minutes ahead, the
> subscriber does not receive the message. If the clocks are put in sync the
> subscriber receives the message ok.
> Is this the expected behavior?
> Is there a way to have the timeToLive work in a way that does not depend on
> producer and subscriber clocks being in sync (since we don't have control
> over the environnent clocks)?
> Thanks
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/timeToLive-with-out-of-sync-clocks-tp3009739p3009739.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>