Arthur B.
Arthur B.

Reputation: 3595

ZMQ and Twisted

I'm trying to do something seemingly simple, but I'm not sure how to go about it...

I have an application that publishes messages over a ZMQ PUB socket. I'd like to write a small server that subscribes to these updates and broadcasts them to all connected websocket clients.

This seems simple on the surface, but I don't know how to trigger an event in the twisted reactor when data is received through the subscription. I know ZMQ has an ioloop as well, but it is not the same as twisted...

What's the best way to go about this? I don't have to use twisted, some other python framework will do if something can deal with this better (rpclib?)

Upvotes: 2

Views: 2633

Answers (1)

Glyph
Glyph

Reputation: 31910

If you want to use ØMQ with Twisted, you can use txZMQ. The documentation on the linked page has a couple of basic examples which ought to get you started.

Upvotes: 3

Related Questions