[zeromq-dev] [External] Re: A PGM/EPGM question

Montero, Antonio UTC CCS Antonio.Montero at fs.utc.com
Fri Mar 23 17:07:07 CET 2018

ZMQ’s implementation of PUB socket type does not allow for receive calls to be made (zmq_recv is disabled), hence why I am trying to figure out how does one trigger ZMQ to call “pgm_recv” on the PUB socket in order to get the PUB socket to processes received NAKs from a remote SUB socket?
I have tried querying the PUB socket state via ZMQ_EVENTS to triggering the processing of any commands available for the socket however that does not seem to move the PGM state machine in terms of processing NAKs.

I am running both a PUB and SUB on the same application on the same host and although I see the same set of sockets being created at the PGM level for both PUB and SUB ZMQ sockets which includes multiple sockets binding to the same port, this does not appear to cause any issues in terms of my SUB socket able to receive multicast messages from a remote PUB and respond with unicast NAKs when data loss is detected.

Any ideas as to how a user should get ZMQ lib to trigger NAKs processing for a PUB socket using either pgm/epgm transports?

Antonio Montero.
From: zeromq-dev [mailto:zeromq-dev-bounces at lists.zeromq.org] On Behalf Of Steven McCoy
Sent: Friday, March 23, 2018 9:55 AM
To: ZeroMQ development list
Subject: [External] Re: [zeromq-dev] A PGM/EPGM question

You should check the PUB socket has a loop that is processing the incoming NAK requests, this is usually recv call based.  The symptoms indicate that the protocol is operating TX-only.


On Wed, Mar 21, 2018 at 19:50 Montero, Antonio UTC CCS <Antonio.Montero at fs.utc.com<mailto:Antonio.Montero at fs.utc.com>> wrote:
I am having a bit of a hard time getting a ZMQ PUB socket reacting to PGM NAKs which means at this point I am not able to recover lost packets
I have tried with both protocols: (pgm and epgm). Still getting the same result.

I have a setup where I create both a PUB and SUB sockets in that order in the same ZMQ context running on the same host and connected to the same IPv6 multicast address and port.
I have N nodes and each node has a PUB and SUB. All N nodes send messages asynchronously and all N nodes receive all messages. My multicast network is working fine whether I use pgm or epgm and all N nodes communicate with each other over IPv6 multicast.
The issue I am having is when a packet loss occurs, a remote SUB sends a unicast NAK back to the source PUB however I am not seeing any NCF or RDATA being sent by the source PUB. I have verified that the packets in question are in fact still in the Tx Window as reported by the SPMs being sent by the source PUB. I have ongoing traffic on a periodic basis which triggers a send and receive respectably on the PUB and SUB sockets and I am clearing out the ZMQ_EVENTS after every send and/or receive. I also have a polling thread running every 150ms to check for ZMQ_EVENTS on both PUB and SUB.

Nothing seems to work in terms of triggering the PUB to react and process the NAKs received from remote SUB. Looking at the code a bit I see this function zmq::pgm_socket_t::process_upstream but
can’t tell if and how it is being triggered. It does not appear to be from my perspective.

Any help or direction would be appreciated. Thanks.


zeromq-dev mailing list
zeromq-dev at lists.zeromq.org<mailto:zeromq-dev at lists.zeromq.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20180323/a700b28d/attachment.htm>

More information about the zeromq-dev mailing list