You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Justin Ross (JIRA)" <ji...@apache.org> on 2013/07/29 17:57:49 UTC

[jira] [Commented] (QPID-2402) qpid::messaging.Message::setTTL() unit ambiguity can cause unexpectected behavior

    [ https://issues.apache.org/jira/browse/QPID-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13722563#comment-13722563 ] 

Justin Ross commented on QPID-2402:
-----------------------------------

http://svn.apache.org/viewvc?view=revision&revision=918575
                
> 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
>            Assignee: Gordon Sim
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org