Skip to content

Add ZeroMQ topics implementation #1

Description

@elchicodepython
  • 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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions