On Wed, 2010-02-10 at 16:51 -0600, Kerry Bonin wrote: > 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.
The Duration object (as several others) is meant to be entirely internal to the qpid code and not to "leak" to the client API. At least we should have explicitly decided it was part of the API if we want it there. It may look convenient, but it's really not been designed to be useful for any more than the internals of qpid. > > 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 we decided to keep the qpid time objects in the client API then we need to recast all times in the API to take (only) the qpid Duration and AbsTime types. > - if ns, then somewhere downstream (OutgoingMessage#351 ?) the ns needs to > get converted to ms This does raise the interesting issue of specifying time in the client API and doing it consistently - Gordon/Rafi do you have any thoughts WRT the new API? Andrew --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:dev-subscr...@qpid.apache.org