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

Connection hangs if no publisher #76

Open
tim-flux opened this issue Jun 16, 2022 · 1 comment
Open

Connection hangs if no publisher #76

tim-flux opened this issue Jun 16, 2022 · 1 comment

Comments

@tim-flux
Copy link

Great Codebase, thank you so much for it. I have a question in regards to the pubsub design. If i have no publisher running the system hangs would it be better to bind the port on the hub side rather than the Senders side.

@jeffbass
Copy link
Owner

I'm not sure I understand what you mean by "system hangs". Perhaps you could share a specific code example? If there is no ImageSender publisher running and sending images, there is nothing for the ImageHub subscriber to process. I would expect the ImageHub to "hang" (not do anything) until the first inbound image is received.

In the typical imageZMQ PUB/SUB architecture, it is assumed that multiple ImageSenders are PUBs and there is a single ImageHub SUB receiving the images from these multiple ImageSender PUBs. The way this is done is to use socket.bind() on each ImageSender PUB and socket.connect (multiple times as needed for multiple ImageSender / publishers) on the SUB / imgageHub side. The imageZMQ PUB/SUB pattern is modeled on this PyZMQ documentation example. I'm not sure how socket.bind() could be used for ImageHub / SUB side.

ZMQ and PyZMQ are capable of many more messaging patterns than the 2 that are implemented in imageZMQ. If one of those messaging patterns would be more suitable, you might want to experiment with forking imageZMQ and using a different ZMQ messaging pattern.

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

No branches or pull requests

2 participants