[zeromq-dev] Multi-part message reception over EPGM
Jim Hague
jim.hague at acm.org
Tue Oct 27 14:26:18 CET 2015
Hi,
I'm using PUB-SUB multicasting with EPGM. I'm using subscription topics, so
sending multi-part messages with the topic in the first part and the content in
the second part.
In the receiver, I'm doing a zmq_poll(), and if the SUB socket shows data
waiting I'm then calling zmg_msg_recv() twice, the first time to get the topic
and the second time the content.
And it's all working well.
But this morning, doing some testing of resilience in the face of network
problems - in this case disconnect and reconnect of the network lead - I found
that my receiver program had blocked. Checking with the debugger, I found it
stuck in the second read. The first read had returned data that was not a
topic, but a message content, and the second read was blocking, waiting for
data that wasn't coming.
Am I right in thinking this shouldn't happen? That if poll() says a message is
waiting, it should be both parts of the multi-part and that there should be no
way a read of the topic should get content?
Both systems are Debian Sid, libzmq3, 4.0.5+dfsg-3
--
Jim Hague - jim.hague at acm.org Never trust a computer you can't lift.
More information about the zeromq-dev
mailing list