elchicodepython / elchicodepython/Python-awesome-Messages
Add ZeroMQ topics implementation
Aperta
enhancement
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
- 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)
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.