...
Sending messages
There is a PULL REP socket waiting to receive message and inject them directly in the message bus. You can send message to the event bus by using a ZMQ PUSH socket REQsocket like this:
Code Block |
---|
|
#!/usr/bin/env python
import zmq
import time
d = {'signal': 'my-signal'"bonjour", "sender": u"externalpoipoi", "data": "Hellohello Worldworld!"}
context = zmq.Context()
publisher = context.socket(zmq.PUSHREQ)
publisher.connect("tcp://localhost:60000")
count = 0
while True:
count += 1
publisher.send_json(d)
message = publisher.recv_json()
print "message {0} ".format(count),message
time.sleep(2) |
Related Issue :
Jira Legacy |
---|
server | JIRA (openwsn.atlassian.net) |
---|
serverId | 86fa4a0d-9af7-33cf-98fd-d8943a0dd0b4 |
---|
key | SW-263 |
---|
|