[zeromq-dev] Best way to loop over incoming messages & raw UDP support

Andrew Linos alinos at gmx.co.uk
Sat Jul 22 23:00:03 CEST 2017


Hi,

I started recently using ZeroMQ (and CZMQ) and I have two questions -- any advice greatly appreciated.

1) I have a PUB/SUB pair -- what's the most efficient way to loop over the incoming messages
if we want to achieve maximum efficiency? Right now I have created an actor for the PUB end, 
an actor for the SUB, and a zpoller that polls the SUB socket in a loop, and receives one message
at a time. Is that (ie, using one blocking call to the zpoller instance per incoming message) the
correct way to do thing?

2) I've read about the STREAM socket type, to talk with non-0mq clients via TCP, and I was
wondering if there's anything similar for UDP? ie, let's say a non-0mq server sends out
data via multicast UDP, can I receive it somehow via a 0mq socket?

Thanks,
Andrew.



More information about the zeromq-dev mailing list