Time to live on messages
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alison_Kakoschke
Posted On:   Tuesday, October 1, 2002 10:39 PM

Hi Andreas I have noticed the following behaviour in our system which is using swiftMQ. Two machines can be set up to send messages to each other successfully. We are then performing a test where we are simulating failure in the system by disconnecting and then reconnecting the network cable between these machines. In the meantime (during the period when the two machines are disconnected) one machine continues to publish messages to the other. What we notice is, that once the machines are reconnected, the second machine receives all messages sent to it during the disconnection state. We currently have set the time to live on all messages to 10 seconds when they are published, but they seem to arrive    More>>

Hi Andreas


I have noticed the following behaviour in our system which is using swiftMQ.


Two machines can be set up to send messages to each other successfully. We are then performing a test where we are simulating failure in the system by disconnecting and then reconnecting the network cable between these machines. In the meantime (during the period when the two machines are disconnected) one machine continues to publish messages to the other.


What we notice is, that once the machines are reconnected, the second machine receives all messages sent to it during the disconnection state. We currently have set the time to live on all messages to 10 seconds when they are published, but they seem to arrive at the other machine more than 10 seconds after they were published.


Is this correct behaviour? Is there any way that we can ensure messages die after 10 seconds regardless if the machines are currently in the connected or disconnected state? I have found an element called 'Listeners' on the JMS swiftlet which has an attribute - 'keepalive-interval'. Can this be used to control this feature?


Thanks in advance


Alison Kakoschke


Software Engineer

   <<Less

Re: Time to live on messages

Posted By:   Andreas_Mueller  
Posted On:   Wednesday, October 2, 2002 02:17 AM

The behavior is correct. The JMS spec states that exprired messages should not be received, however, it is not guaranteed.


SwiftMQ purges expired messages during cleanup intervals. It is defined under the Queue Manager Swiftlet config. There is a default cleanup interval which is taken for all system (e.g. routing), temp and durable subscriber queues. For regular PTP queues (those you define in the Queue Manager Swiftlet, e.g. testqueue), you can overwrite this cleanup interval on a per-queue-base.


Look here for config details. Default cleanup interval is 120000 ms (2 min). So every 2 minutes all expired messages are purged.
About | Sitemap | Contact