Skip to content

Problem: zmq 4.1.6 cannot pub msg to a zmq 2.x #2254

Closed
zeromq/zeromq4-1
#160
@laplaceyang

Description

@laplaceyang

In some of my code, my server use the zmq 4.1.6 with PUB mode, and another old server with SUB mode build with zmq 2.2.0.

Then I cannot receive anything in the sub server.

Here is the example:
https://gist.github.com/laplaceyang/8cf1c004832f4ef618c69ceb868ef33b
build the PUB server with zmq 4.1.6 and SUB server with zmq 2.x

but if i build the server with zmq 3.x, it works.

It seems that change in stream_engine.cpp lead to this problem


In zmq 3.x, we have function

image

we inject a phantom subscription message and process identity msg in the same function

but in zmq 4.x, we separate it to two function

identity process func
image
inject phantom subscription message function
image

This change lead that,we should trigger two socket in event to finish subscribe.

but I dump the tcp package,
The SUB server just send one package to PUB.

image
After this no more package exchanges

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions