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

Use bind instead of connect when creating the publisher socket #64

Closed
wants to merge 1 commit into from

Conversation

Dolmio
Copy link
Contributor

@Dolmio Dolmio commented Feb 11, 2016

I tried to setup two csp nodes communicating through zmq.
I wasn't able to get things working without changing this.
New to zmq so not entirely sure if that's the way how pub
and sub sockets should be started.

I tried to setup two csp nodes communicating through zmq.
I wasn't able to get things working without changing this.
New to zmq so not entirely sure if that's the way how pub
and sub sockets should be started.
@pacheco017
Copy link

Hi, Dolmio.

The key to use ZMQ without any modification to current libcsp code, is to have a "ZMQ Forwarder" process available. Be sure to check http://learning-0mq-with-pyzmq.readthedocs.org/en/latest/pyzmq/devices/forwarder.html

Basically, you need to run forwarder_device.py with the same endpoints you pass to csp_zmqhub_init_w_endpoints, but taking into account that a PUB socket connects to a SUB socket and so on (check the graph on the link above).

With this architecture, the forwarder must be always available, the endpoints it uses are "well-known", and you can connect as many CSP processes as you wish.

@Dolmio
Copy link
Contributor Author

Dolmio commented Feb 11, 2016

Hah, thx. No surprise that I was missing something :)

@jledet
Copy link
Contributor

jledet commented Mar 29, 2016

Right, you need a proxy service that forwards messages between the connected nodes. Closing this pull request. I've added an issue to move our zmq service to the public tree.

@jledet jledet closed this Mar 29, 2016
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 this pull request may close these issues.

None yet

3 participants