OK...  (for the C++ code)

qpid::messaging.Message::setTTL( boost::uint64_t ttl );
I was using this with a qpid::sys::Duration() object, which stores time in a
boost::posix_time::ptime object.
This is documented to store in units of nanoseconds.

According to /cpp/src/qpid/broker/Message # 351-2, TTL is supposed to be set
in milliseconds.  When I manually send ms, it works fine.

I would recommend:
- document Message.setTTL units clearly - pick ms or ns
  - if ms, then overload setTTL to take a Duration object so we can use
without error by converting in setTTL
  - if ns, then somewhere downstream (OutgoingMessage#351 ?) the ns needs to
get converted to ms

Kerry


On Wed, Feb 10, 2010 at 2:08 PM, Kerry Bonin <kerrybo...@gmail.com> wrote:

> In my test case (trunk C++ via messaging) I fire one message w/ 2 sec TTL
> each time I run, then see how many messages I can read, and they never go
> away until I kill the broker.  I'm not acknowledging anything, as I should
> have multiple listeners for these events.
>
>
>
> On Wed, Feb 10, 2010 at 2:01 PM, Carl Trieloff <cctriel...@redhat.com>wrote:
>
>> 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...
>>>
>>>
>>>
>>
>>
>> They should be reaped at mgnt interval if no client connected, or when
>> someone trys to consume messages.
>>
>> Are they not being reaped on an idle queue or you getting expired messages
>> at the consumer?
>>
>> Carl.
>>
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:dev-subscr...@qpid.apache.org
>>
>>
>

Reply via email to