astitcher commented on a change in pull request #348:
URL: https://github.com/apache/qpid-proton/pull/348#discussion_r772598131
##########
File path: ruby/lib/core/message.rb
##########
@@ -201,6 +201,9 @@ def ttl=(time)
# Returns the time-to-live, in milliseconds.
#
+ # The default ttl value for a new message is 0. If this value is 0, Proton
+ # will send no ttl message header.
+ #
def ttl
Review comment:
Same comment as for Python.
##########
File path: python/proton/_message.py
##########
@@ -225,6 +225,9 @@ def ttl(self) -> float:
"""The time to live of the message measured in seconds. Expired
messages
may be dropped.
+ The default ttl value for a new message is 0. If this value is 0,
+ Proton will send no ttl message header.
+
:raise: :exc:`MessageException` if there is any Proton error when
using the setter.
Review comment:
Given your comments I'm wondering if we should check for 0 and return
None in this case.
##########
File path: c/include/proton/message.h
##########
@@ -203,6 +203,9 @@ PN_EXTERN pn_millis_t pn_message_get_ttl
(pn_message_t *msg);
*
* See ::pn_message_get_ttl() for a detailed description of message ttl.
*
+ * The default ttl value for a new message is 0. If this value is 0, Proton
+ * will send no ttl message header.
+ *
Review comment:
I think this comment is in the wrong place and should explain what
getting a 0 value would mean. 'default' is an ambiguous word here. I think what
you are trying to say there (in pn_message_get_ttl) would be more like: ' A
newly created message returns a ttl value of 0. This means that no ttl value is
set in the message header.'
Here what I think you are saying is - 'If TTL is not set on a message then
no ttl value is sent in the message header. Setting a ttl value of 0 has the
same effect as not setting the ttl vaule.'
In any case if you want to properly explain the handling of ttl you need to
fix the explananation in _get_ because it is noted is the primary explanation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]