Re: blocking messenger and remote-idle-timeout heartbeating
On Mon, Oct 27, 2014 at 12:12 PM, Dominic Evans wrote: > When using messenger in non-blocking mode, it is possible to ensure that > the > empty frame heartbeats are sent by calling pn_messenger_work(timeout) on a > regular interval (when no other send / recv operations are happening). > > However, when using messenger in blocking mode it is not obvious how one > should achieve this without optional timeout arguments on all the calls? > > For example, both pn_messenger_send and pn_messenger_recv accept limits of > the number of messages to send and receive during the block, but no option > for a timeout on these. > You can set the timeout that any blocking calls use with pn_messenger_get/set_timeout, however there is no need to do this in order to ensure that heartbeat frames are sent. That should happen even when messenger is blocked in pn_messenger_send or pn_messenger_recv. --Rafael
Re: blocking messenger and remote-idle-timeout heartbeating
Dominic Evans wrote > When using messenger in non-blocking mode, it is possible to ensure that > the empty frame heartbeats are sent by calling pn_messenger_work(timeout) > on a regular interval (when no other send / recv operations are > happening). > > However, when using messenger in blocking mode it is not obvious how one > should achieve this without optional timeout arguments on all the calls? > > For example, both pn_messenger_send and pn_messenger_recv accept limits of > the number of messages to send and receive during the block, but no option > for a timeout on these. Thinking about this some more. If a idle-timeout is advertised by the remote end of a Link, should any blocking calls automatically have a timeout less than that value? -- View this message in context: http://qpid.2158936.n2.nabble.com/blocking-messenger-and-remote-idle-timeout-heartbeating-tp7615767p7615791.html Sent from the Apache Qpid Proton mailing list archive at Nabble.com.
blocking messenger and remote-idle-timeout heartbeating
When using messenger in non-blocking mode, it is possible to ensure that the empty frame heartbeats are sent by calling pn_messenger_work(timeout) on a regular interval (when no other send / recv operations are happening). However, when using messenger in blocking mode it is not obvious how one should achieve this without optional timeout arguments on all the calls? For example, both pn_messenger_send and pn_messenger_recv accept limits of the number of messages to send and receive during the block, but no option for a timeout on these. -- View this message in context: http://qpid.2158936.n2.nabble.com/blocking-messenger-and-remote-idle-timeout-heartbeating-tp7615767.html Sent from the Apache Qpid Proton mailing list archive at Nabble.com.