[zeromq-dev] expose dead/slow zyre peer to application layer

Pieter Hintjens ph at imatix.com
Tue Sep 1 16:56:33 CEST 2015


If a peer becomes unreachable and removed, there's a LEAVE event. Is
this not what you need?

On Tue, Sep 1, 2015 at 4:39 PM, Johan Philips <johan.philips at kuleuven.be> wrote:
> Dear all
>
> We are using Zyre/Pyre in our application and it would be great if we
> could expose the pings sent between peers to our application layer,
> especially if one of the peers becomes unreachable.
>
> In the current Zyre implementation, in zyre_node.c it is only logged
> with zsys, if in verbose mode. In zyre_node_ping_peerm you have:
>
> if (zclock_time () >= zyre_peer_evasive_at (peer)) {
>          //  If peer is being evasive, force a TCP ping.
>          //  TODO: do this only once for a peer in this state;
>          //  it would be nicer to use a proper state machine
>          //  for peer management.
>          if (self->verbose)
>              zsys_info ("(%s) peer seems dead/slow name=%s endpoint=%s",
>                  self->name, zyre_peer_name (peer), zyre_peer_endpoint
> (peer));
>          zre_msg_t *msg = zre_msg_new (ZRE_MSG_PING);
>          zyre_peer_send (peer, &msg);
>
>
> How could we benefit from this peer management to either send an event
> to our application (using zyre.c) or do we need to do the timing ourselves?
>
> Johan
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev



More information about the zeromq-dev mailing list