In a very simple test case with two sockets (PUB and SUB), binding the PUB socket and connecting the SUB socket works. But when binding the SUB socket and connecting the PUB socket, the message is not received (tested with both zmq_poll() and zmq_recvmsg()).
Since it worked with ZeroMQ 2.2, I was told on #zmq that it's an issue related to the fact that subscription is now done on the PUB side.
Tested on Linux.
An odd thing to note, if you put a poll of any duration before the send the subsock will receive the message.
memset(&pollitem, 0, sizeof(zmq_pollitem_t));
pollitem.socket = subsock;
pollitem.events = ZMQ_POLLIN;
ret = zmq_poll(&pollitem, 1, 1);
/* sendmsg */
/* original poll */
Confirmed on todays master.
Also happens on tcp transport on local machine.
To it seems that the connection is not in "ready" state in this configuration,
which might hold back the proper handling of the subscription.
The poll seems to trigger something that allows the connection to be recognized
by the SUB socket.
As of now I didn't find out how the bind/connect thing works.
Just found out that the above mentioned poll trick does not work w/ tcp
only with inproc.