[zeromq-dev] Spurious unexpected message on DEALER socket

Pieter Hintjens ph at imatix.com
Tue Dec 8 15:00:41 CET 2015

This is a new one. Is it possible to make a minimal case that reproduces this?

On Mon, Dec 7, 2015 at 10:33 AM, Auer, Jens <jens.auer at cgi.com> wrote:
> Hi,
> I have a strange case of a spurious message being received on a dealer socket which is not connected to any peers. In my setup, we have multiple processes forming a processing chain connected with PUB/SUB sockets. Each process has an additional dealer socket which can be used to send some kind of commands to the process. All processing is done in a reactor main loop with zmq_poll so there is no threading involved. In a nutshell, a process has three sockets:
> - a SUB to receive data
> - a PUB to send processed data to the next stage
> - a DEALER to receive/send commands
> Rarely, we see that the dealer socket receives a message, although nobody is connected to the socket. I was able to inspect the message and check the contents. It turned out that this is the probe message we send on the dealer socket to announce ourselves to the other side (which will be a router); this was before we switched to use ZMQ_PROBE_ROUTER and now an empty message is received. I have added code that overwrites the message data of the probe message after it has been sent, so I am quite sure that it is not a random pointer coincidentally pointing to that memory location. Rather, it seems that zeroMQ somehow returns the message as a newly received message.
> Has anybody seen this issue before?
> Best wishes,
>   Jens
> --
> Dr. Jens Auer | CGI | Software Engineer
> CGI Deutschland Ltd. & Co. KG
> Rheinstraße 95 | 64295 Darmstadt | Germany
> T: +49 6151 36860 154
> jens.auer at cgi.com
> Unsere Pflichtangaben gemäß § 35a GmbHG / §§ 161, 125a HGB finden Sie unter de.cgi.com/pflichtangaben.
> CONFIDENTIALITY NOTICE: Proprietary/Confidential information belonging to CGI Group Inc. and its affiliates may be contained in this message. If you are not a recipient indicated or intended in this message (or responsible for delivery of this message to such person), or you think for any reason that this message may have been addressed to you in error, you may not use or copy or deliver this message to anyone else. In such case, you should destroy this message and are asked to notify the sender by reply e-mail.
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list