You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by patrickjamesbarry <pa...@gmail.com> on 2008/03/14 00:26:17 UTC

timeStampingBrokerPlugin and Time to live

I have set the producer time to live value to expire messages after 10 sec.
However, if the sys clock on the producer is different than the brokers,
chances are high that this 10 sec window will never be realized and ALL
messages will be considered expired. I saw the timeStampingBrokerPlugin is
the solution to this problem, however, when I use it, the message timestamp
= brokerInTime (which it should) but the expiration time is wrong (timestamp
+ 10 sec).  Do I need to do anything additional to get this to work?  I
added this xml snippet to my xbean:
<plugins>
   <timeStampingBrokerPlugin/>
</plugins>
-- 
View this message in context: http://www.nabble.com/timeStampingBrokerPlugin-and-Time-to-live-tp16041093s2354p16041093.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: timeStampingBrokerPlugin and Time to live

Posted by Rob Davies <ra...@gmail.com>.
this has been updated in svn trunk - to set the expiration time
On 14 Mar 2008, at 21:05, patrickjamesbarry wrote:

>
> More info on my issue:
>
>
> Setup:
> Running a producer locally, with TTL set to 3000ms (on my laptop)
> Connecting to remote broker via mulitcast
>
> I set my laptop clock back 5 min and try to hit the broker with the  
> correct
> time. I get this...
> DEBUG RegionBroker                   - Message expired  
> ActiveMQObjectMessage
> {commandId = 6, responseRequired = true, transactionId = null,  
> expiration =
> 1205525689525, timestamp = 1205525686525, arrival = 0, brokerInTime =
> 1205526013325, brokerOutTime = 0, correlationId = null}
>
> I added the timeStampingBrokerPlugin so timeouts can be calculated  
> using
> Broker clock. I get this msg:
> DEBUG RegionBroker                   - Message expired  
> ActiveMQObjectMessage
> {commandId = 6, responseRequired = true,  transactionId = null,  
> expiration =
> 1205526055718, timestamp = 1205526379498, arrival = 0, brokerInTime =
> 1205526379498, brokerOutTime = 0, correlationId = null}
>
> The timestamp and brokerInTime are in sync, but expiration is wrong.  
> It
> should be timestamp + 3 seconds
>
> Then I set my laptop time 5 minutes faster than my broker. The only  
> thing
> that appears in my brokers logs are:
> DEBUG AMQMessageStore                - Journalled message add for:
> ID:patrick-32776-1205523020988-0:0:1:30:1, at: offset = 91661, file  
> = 1,
> size = 746, type = 1
> The message gets to my service.  In my service logs (which runs on  
> the same
> server as broker), the message output is:
> 2008-03-14 16:37:40,423 DEBUG [ActiveMQ Session Task]  
> ActiveMQSession (1624)
> - ID:patrick-32776-1205523020988-0:0:1 sending message:
> ActiveMQObjectMessage {commandId = 0, responseRequ
> ired = false,  expiration = 0, timestamp = 1205527060423, arrival = 0,
> brokerInTime = 0, brokerOutTime = 0, correlationId = null}
>
> I stripped out contents of the message that would have made this  
> post long,
> but let me know if you want to see the entire thing.  In none of these
> scenarios did the expiration time work as explained in docs.  I am  
> running
> v5.0.0 and here are my broker configs. Please help!
>
>
>
>
>
>
>
> 		
> 	
>
> 	
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -- 
> View this message in context: http://www.nabble.com/timeStampingBrokerPlugin-and-Time-to-live-tp16041093s2354p16055598.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: timeStampingBrokerPlugin and Time to live

Posted by patrickjamesbarry <pa...@gmail.com>.
More info on my issue:


Setup:
Running a producer locally, with TTL set to 3000ms (on my laptop)
Connecting to remote broker via mulitcast 

I set my laptop clock back 5 min and try to hit the broker with the correct
time. I get this...
DEBUG RegionBroker                   - Message expired ActiveMQObjectMessage
{commandId = 6, responseRequired = true, transactionId = null, expiration =
1205525689525, timestamp = 1205525686525, arrival = 0, brokerInTime =
1205526013325, brokerOutTime = 0, correlationId = null}

I added the timeStampingBrokerPlugin so timeouts can be calculated using
Broker clock. I get this msg:
DEBUG RegionBroker                   - Message expired ActiveMQObjectMessage
{commandId = 6, responseRequired = true,  transactionId = null, expiration =
1205526055718, timestamp = 1205526379498, arrival = 0, brokerInTime =
1205526379498, brokerOutTime = 0, correlationId = null}

The timestamp and brokerInTime are in sync, but expiration is wrong. It
should be timestamp + 3 seconds

Then I set my laptop time 5 minutes faster than my broker. The only thing
that appears in my brokers logs are: 
DEBUG AMQMessageStore                - Journalled message add for:
ID:patrick-32776-1205523020988-0:0:1:30:1, at: offset = 91661, file = 1,
size = 746, type = 1 
The message gets to my service.  In my service logs (which runs on the same
server as broker), the message output is:
2008-03-14 16:37:40,423 DEBUG [ActiveMQ Session Task] ActiveMQSession (1624)
- ID:patrick-32776-1205523020988-0:0:1 sending message:
ActiveMQObjectMessage {commandId = 0, responseRequ
ired = false,  expiration = 0, timestamp = 1205527060423, arrival = 0,
brokerInTime = 0, brokerOutTime = 0, correlationId = null}

I stripped out contents of the message that would have made this post long,
but let me know if you want to see the entire thing.  In none of these
scenarios did the expiration time work as explained in docs.  I am running
v5.0.0 and here are my broker configs. Please help!



  

  
     
		 
	 

	
    
    
       
    

    
    
      
    

  



-- 
View this message in context: http://www.nabble.com/timeStampingBrokerPlugin-and-Time-to-live-tp16041093s2354p16055598.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.