ZeroMQ
- https://zeromq.org/
- An open-source universal messaging library
ØMQ - The Guide - ØMQ - The Guide
ZeroMQ | Get started
pyzmq · PyPI
ZeroMQ - Wikipedia
- https://en.wikipedia.org/wiki/ZeroMQ
- ZeroMQ (also spelled ØMQ, 0MQ or ZMQ) is a high-performance asynchronous messaging library, aimed at use in distributed or concurrent applications. It provides a message queue, but unlike message-oriented middleware, a ZeroMQ system can run without a dedicated message broker. The library's API is designed to resemble Berkeley sockets.
GitHub - zeromq/pyzmq: PyZMQ: Python bindings for zeromq
Subclassing QueueHandler - a ZeroMQ example - Logging Cookbook — Python 3.8.4 documentation
Eventloops and PyZMQ — PyZMQ 19.0.0 documentation
asyncio — PyZMQ 19.0.0 documentation
Client / Server — Learning 0MQ with examples
- https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/client_server.html
- socket zmq.REQ will block on send unless it has successfully received a reply back.
- socket zmq.REP will block on recv unless it has received a request.
Push/Pull — Learning 0MQ with examples
- https://learning-0mq-with-pyzmq.readthedocs.io/en/latest/pyzmq/patterns/pushpull.html
- Producers are created with ZMQ.PUSH socket types. Producer is bound to well known port to which consumers can connect too.
- Producers are created with ZMQ.PULL socket types to pull requests from producer and uses a push socket to connect and push result to result collector.
How to start / stop / run a service ?
- Refer to 学习笔记之asyncio — Asynchronous I/O - 浩然119 - 博客园
- https://www.cnblogs.com/pegasus923/p/13531730.html