qpid::messaging.Message::setTTL() unit ambiguity can cause unexpectected
behavior
---------------------------------------------------------------------------------
Key: QPID-2402
URL: https://issues.apache.org/jira/browse/QPID-2402
Project: Qpid
Issue Type: Bug
Components: C++ Broker, C++ Client
Reporter: Kerry Bonin
qpid::messaging.Message::setTTL( boost::uint64_t ttl ) - does not declare its
units.
The currently exposed time types are AbsTime and Duration, which seems to imply
they should be used for encapsulating time.
When a Duration object is passed to setTTL, the inline operator int64_t()
returns the member variable nanoseconds.
When this value is propagated to the broker, it is interpreted around
/cpp/src/qpid/broker/Message # 353 to be in millisecond units.
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
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]