[zeromq-dev] PUSH Socket is queued?

Doron Somech somdoron at gmail.com
Wed Feb 26 18:01:31 CET 2014


If you don't have any pull socket connected you can get eagain...
On Feb 26, 2014 5:45 PM, "Stéphane Wirtel" <stephane at wirtel.be> wrote:

> With get_hwm() on the socket, the value is 1000.
>
>
> On 26 Feb 2014, at 17:29, Stéphane Wirtel wrote:
>
> > Hi all,
> >
> > I wanted to know if there is a queue for the message of a PUSH socket,
> > because my send is blocking or in error with the EAGAIN error.
> >
> > Here is the example:
> >
> > #!/usr/bin/env python
> >
> > import zmq
> >
> > context = zmq.Context()
> >
> > sender = context.socket(zmq.PUSH)
> > sender.bind('tcp://*:5557')
> >
> > for task in range(100):
> >   print task
> >   sender.send_string(u'%d' % task, zmq.DONTWAIT)
> >
> > sender.close()
> > context.terminate()
> >
> >> (zmq) python push.py
> > 0
> > Traceback (most recent call last):
> > File "push.py", line 12, in <module>
> >   sender.send_string(u'%d' % task, zmq.DONTWAIT)
> > File
> >
> "/Users/stephane/.virtualenvs/zmq/lib/python2.7/site-packages/zmq/sugar/socket.py",
> > line 290, in send_string
> >   return self.send(u.encode(encoding), flags=flags, copy=copy)
> > File "socket.pyx", line 565, in zmq.backend.cython.socket.Socket.send
> > (zmq/backend/cython/socket.c:5104)
> > File "socket.pyx", line 620, in zmq.backend.cython.socket.Socket.send
> > (zmq/backend/cython/socket.c:4972)
> > File "socket.pyx", line 156, in zmq.backend.cython.socket._send_frame
> > (zmq/backend/cython/socket.c:1842)
> > File "checkrc.pxd", line 15, in zmq.backend.cython.checkrc._check_rc
> > (zmq/backend/cython/socket.c:5784)
> > zmq.error.Again: Resource temporarily unavailable
> >
> > Do you have an idea?
> >
> > Thanks
> >
> > Regards,
> >
> > Stephane
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140226/aac1a223/attachment.htm>


More information about the zeromq-dev mailing list