diff options
| author | sideshowdave7 | 2016-12-16 18:29:13 -0700 |
|---|---|---|
| committer | sideshowdave7 | 2016-12-16 18:29:13 -0700 |
| commit | fa8ef3f4956470fdc689349bb19d5a831e63083c (patch) | |
| tree | 67c07132e2db95f9a7747009b165cf514d5ddb86 /bin/send_publish | |
| parent | fbb4a93bb99fcd41a55333e9205c1f1c9c97b48b (diff) | |
| download | eventmq-fa8ef3f4956470fdc689349bb19d5a831e63083c.tar.gz eventmq-fa8ef3f4956470fdc689349bb19d5a831e63083c.zip | |
Initial pubsub
Diffstat (limited to 'bin/send_publish')
| -rwxr-xr-x | bin/send_publish | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/send_publish b/bin/send_publish new file mode 100755 index 0000000..52f9f6d --- /dev/null +++ b/bin/send_publish | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/usr/bin/env python | ||
| 2 | """ | ||
| 3 | Usage: ./send_msg <ipaddresss> <command> <frame w/ values space separated> | ||
| 4 | """ | ||
| 5 | import sys | ||
| 6 | import zmq | ||
| 7 | |||
| 8 | from eventmq.sender import Sender | ||
| 9 | from eventmq.client.messages import send_publish_request | ||
| 10 | |||
| 11 | if __name__ == "__main__": | ||
| 12 | for i in xrange(1): | ||
| 13 | s = Sender() | ||
| 14 | s.connect(sys.argv[1]) | ||
| 15 | |||
| 16 | topic = sys.argv[2] | ||
| 17 | msg = ['update', '1'] | ||
| 18 | |||
| 19 | send_publish_request(s, topic, msg) | ||