Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
laplaceyang opened this issue Dec 14, 2016 · 1 comment · Fixed by zeromq/zeromq4-1#160
Closed

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

laplaceyang opened this issue Dec 14, 2016 · 1 comment · Fixed by zeromq/zeromq4-1#160

Comments

@laplaceyang
Copy link
Contributor

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

@laplaceyang
Copy link
Contributor Author

well , I create a pull request just now. pr#2256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant