[zeromq-dev] BUG: SUB socket + multi-part message + disconnect + recv = Assertion failed at src/fq.cpp:117

zmqdev zmqdev at amitego.com
Fri Oct 7 10:28:50 CEST 2016


On 07.10.2016 10:14, Laughing wrote:
>     *>>>* Is that mean that socket.disconnect does not disconnect from
>     all endpoint connected before?

see http://api.zeromq.org/4-1:zmq-disconnect

	int zmq_disconnect (void *socket, const char *endpoint);

zmq_disconnect disconnects the socket from the given endpoint *only*.

>     *>>> *It is a so bad news. I would like to use the disconnect
>     routine to discard messages in 'REQ/REP' and 'PUSH/PULL' mode.

A ZeroMQ socket holds received messages in a queue.

To empty the queue, you can

	a. receive and discard the messages until zmq_poll tells
	   you there is no data

	b. destroy, then recreate & reconnect the socket

I do not know the internal details, for example whether a socket has a 
queue per connection.

The bug seems to point towards some data management problem between 
queues in the socket.






More information about the zeromq-dev mailing list