elchicodepython / elchicodepython/Python-awesome-Messages
Add ZeroMQ topics implementation
Open
enhancement
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
- Support ZeroMQ topics.
- Support ZeroMQ authentication.
Demo sending JSON to ZeroMQ topic:
```
import sys
import time
port = "5556"
if len(sys.argv) > 1:
port = sys.argv[1]
int(port)
context = zmq.Context()
socket = context.socket(zmq.PUB)
socket.bind("tcp://*:%s" % port)
import json
while True:
topic = "pac"
messagedata = json.dumps({"hello": "world"})
print ("%s %s" % (topic, messagedata))
socket.send_string("%s %s" % (topic, messagedata))
time.sleep(1)
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.