[zeromq-dev] Question on zmq_poll

Badhrinath Manoharan badhrim at gmail.com
Wed Jul 30 20:05:01 CEST 2014

Hi Team,

I did check the manual page on zmq_poll which polls multiple sockets in a
load balanced fashion for notifying any messages received on the socket.

I had two sockets and had issued the following.

zmq_pollitem_t items[] =
            {{frontend, 0, ZMQ_POLLIN, 0},
             {backend, 0, ZMQ_POLLIN, 0}};

  while (1) {
        ret = zmq_poll(items, 2, -1);
        if (items[0].revents & ZMQ_POLLIN) {
        if (items[1].revents & ZMQ_POLLIN) {

With this I could see on each socket the first message delivery happening.
However further messages on either sockets are never notified and it just
stays in while loop.

Am I missing something here?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140730/fd2ea075/attachment.htm>

More information about the zeromq-dev mailing list