Hi Gordon, thanks for the answer.
So to make it work it is enough to set idle timeout on both sides and proton will handle rest? Is heartbeat being sent by pn_transport_tick() ? If so in what event it should be sent? In PN_TRANSPORT ? Regards, Tomas 2015-07-28 11:01 GMT+02:00 Gordon Sim <g...@redhat.com>: > On 07/28/2015 08:17 AM, Tomáš Šoltys wrote: > >> Hi, >> >> I am looking for a way hot to send a heartbeat. I have found something >> about sending an empty frame and pn_transport_set_idle_timeout() >> >> Is this somewhat related? Is there a way how to send/receive heartbeats? >> > > In AMQP 1.0, heartbeats are configured separately in each direction. That > is, each of the connected processes indicates how frequently the remote > peer should send some traffic in order to prevent the connection timing out > due to being idle. > > So in proton, to indicate to the remote peer that they should send > heartbeats, you do indeed set the idle timeout. Proton will advertise half > that time to the peer such that they should then send heartbeats frequently > enough to avoid the connection timing out when connected. > > The sending out of heartbeats by the local peer is controlled by the > remote peer and whatever idle timeout it has advertised. > > -- Tomáš Šoltys tomas.sol...@gmail.com http://www.range-software.com (+420) 776-843-663