elchicodepython / elchicodepython/Python-awesome-Messages
Add ZeroMQ topics implementation
Đang mở
enhancement
- Ngôn ngữ chính
- Python
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
- 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)
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.