On 02/10/2010 02:54 PM, Kerry Bonin wrote:
I just validated a report from a few of my developers that TTL doesn't seem
to be working with the 0.6 broker, is anyone working on this ? If not I can
have a look. If it does work I'd like to compare notes to see what we're
doing wrong... Thx!
(may be QPID-1418, QPID-1575 ?)
This has been seen by my Python developer using 0.5 api w/ 0.6 broker, and I
just saw in 0.6 trunk C++ using Messaging. In the C++ I'm creating w/
type:topic, calling qpid::messaging::Message.setTTL( TIME_SEC * 2 ), and
never see the events go away. Not sure if this is a broker issue or a
messaging issue...
Messages are not deleted immediately when their TTL expires. There are two ways
TTL messages can get dropped on the broker. If a consumer is looking for the
next message on a queue, any stale messages at the front of the queue are
dropped. There is also a periodic cleanup operation that removes stale messages
from the queue but the default interval is 10 minutes. You can set a smaller
interval in seconds with the --queue-purge-interval option or config file setting.
If your main concern with TTL is ensuring stale messages don't reach consumers
then the default settings are fine. If your main concern is limiting the size of
queues in memory you probably want a smaller interval. The periodic cleanup
operation currently involves a linear sweep of all queues with TTL messages so
there may be some impact on performance during the sweep if you have a lot of
deep queues.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscr...@qpid.apache.org