You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jerb <je...@bluenotenetworks.com> on 2006/08/08 22:44:26 UTC

JMSExpiration problem

Hi,
I'm investigating using the JMSExpiration property of the message header and
I'm troubled by something I saw in the code. The code I looked at is 4.0.1.
When a message is sent, the expiration is determined based on the time to
live + System.currentTimeMillis() of the sending machine. The JMSTimestamp
is also set to be System.currentTimeMillis() of the sending machine. When
the broker does its own expiration calculation, it uses
System.currentTimeMillis() of the broker machine. If the broker's machine
and the sending machine have different system times, won't this adversely
affect the expiration logic?
-- 
View this message in context: http://www.nabble.com/JMSExpiration-problem-tf2075126.html#a5714665
Sent from the ActiveMQ - User forum at Nabble.com.


Re: JMSExpiration problem

Posted by jerb <je...@bluenotenetworks.com>.
I see. The JMS API's definition assumes that all machines are synchronizing
with the same clock. I don't know if that's something I can count on. Thanks
for responding.

-- 
View this message in context: http://www.nabble.com/JMSExpiration-problem-tf2075126.html#a5725353
Sent from the ActiveMQ - User forum at Nabble.com.


Re: JMSExpiration problem

Posted by James Strachan <ja...@gmail.com>.
On 8/8/06, jerb <je...@bluenotenetworks.com> wrote:
>
> Hi,
> I'm investigating using the JMSExpiration property of the message header and
> I'm troubled by something I saw in the code. The code I looked at is 4.0.1.
> When a message is sent, the expiration is determined based on the time to
> live + System.currentTimeMillis() of the sending machine. The JMSTimestamp
> is also set to be System.currentTimeMillis() of the sending machine. When
> the broker does its own expiration calculation, it uses
> System.currentTimeMillis() of the broker machine. If the broker's machine
> and the sending machine have different system times, won't this adversely
> affect the expiration logic?

Yes - though this is a JMS API thing rather than our implementation.

For more details see

http://java.sun.com/j2ee/1.4/docs/api/javax/jms/Message.html#getJMSExpiration()

-- 

James
-------
http://radio.weblogs.com/0112098/