[zeromq-dev] Zeromq messages getting dropped

Ritesh Adval riteshadval at gaikai.com
Wed Jan 16 23:08:18 CET 2013

Hi Charles,

Yes I close the socket in my thread after sending 100 messages, and I
expect that LINGER will make sure messages are sent to the other end, I
expected that context termination will block and make sure any pending
messages are sent, but thats not happening. context termination returns

Just now tried again in my unit test by setting LINGER to Integer.MAX_VALUE
explicitly in all my sockets and ran the test again and it did fail with
messages getting dropped.

The interesting thing is only the 100th message  (The last one) from some
of my concurrent threads are getting dropped.


On Wed, Jan 16, 2013 at 9:56 PM, Charles Remes <lists at chuckremes.com> wrote:

> On Jan 16, 2013, at 3:50 PM, Ritesh Adval <riteshadval at gaikai.com> wrote:
> > I found that people have reported this error and one suggestion is to
> put sleep after sending message. If I put sleep after sending message using
> a socket it does work but not always, specially under large message size
> and heavy load.
> >
> >
> >
> > Anyone has idea on what could be the issue?
> Your original message said that LINGER is set to a very large value. I am
> assuming that when you send your messages from each of the 100 threads,
> when they are done then you close the socket. The LINGER value controls how
> long a packet may sit in the buffer before the socket is forced closed and
> the packet gets dropped.
> If a "sleep" fixes the problem, then clearly some socket is being closed
> prematurely and its LINGER times out thereby dropping packets. I would
> double check that all DEALER sockets and your ROUTER socket have a proper
> LINGER setting.
> cr
> _______________________________________________
> 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/20130116/421a2e55/attachment.htm>

More information about the zeromq-dev mailing list