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

Support ZeroMQ #126

Open
bgervan opened this issue Jul 21, 2023 · 1 comment
Open

Support ZeroMQ #126

bgervan opened this issue Jul 21, 2023 · 1 comment

Comments

@bgervan
Copy link

bgervan commented Jul 21, 2023

Pushpin supports ZeroMQ https://pushpin.org/docs/usage/#publishing

It would be great if this package can use zeroMQ between pushpin instances and the server.
Maybe the https://github.com/fanout/pypubcontrol is a good base for that.
Using for publishing a message is easier to understand, but how the pushpin to server direction can be implemented?
The idea is form here: https://pushpin.org/docs/advanced/#subscription-forwarding

@jkarneges
Copy link
Member

django-eventstream does use pypubcontrol and it is possible to use ZeroMQ with it.

You'll need to set GRIP_PROXIES instead of GRIP_URL in your settings.py, in order to set special configuration like this:

GRIP_PROXIES = [{
    'control_zmq_uri': 'tcp://localhost:5563',
    'require_subscribers': True
}]

Be sure Pushpin is running before the Django app is started. On start, the Django app will make an RPC call to the specified ZeroMQ address for feature discovery. The require_subscribers option tells the app to send messages using a ZeroMQ PUB socket (instead of PUSH) if supported by Pushpin.

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