Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjdev/zmq-tools
ZeroMQ tools
https://github.com/kjdev/zmq-tools
Last synced: 25 days ago
JSON representation
ZeroMQ tools
- Host: GitHub
- URL: https://github.com/kjdev/zmq-tools
- Owner: kjdev
- License: mit
- Created: 2014-02-28T05:56:03.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-28T06:06:40.000Z (almost 11 years ago)
- Last Synced: 2024-11-18T00:52:26.821Z (about 2 months ago)
- Language: C++
- Size: 2.32 MB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zmq-tools: ZeroMQ tools
## zmq-server
ZeroMQ Server.
```
Usage: zmq-server -e -t [-s SUBSCRIBE]
[-S [-d <DELIMITER>]]
[-D <COMMAND> [-p <FILE>]] [-l <FILE>]
```option | description
---------------------------|-------------
-e, endpoint=ENDPOINT | ZeroMQ socket endpoint
-t, --type=TYPE | ZeroMQ type [PULL|SUB|REP|STREAM]
-s, --subscribe=SUBSCRIBE | ZeroMQ subscribe key [type=SUB] <default: none>
-S, --script=SCRIPT | script to run after receive
-d, --delimiter=DELIMITER | delimiter when sending the script <default: none>
-D, --daemon=COMMAND | daemon command [start|stop]
-p, --pidfile=FILE | pid file <default: /var/run/zmqd.pid>
-l, --log=FILE | log file <default: none(stderr)>## zmq-client
ZeroMQ Client.
```
Usage: zmq-client -e <ENDPOINT> -t <TYPE> [-l <FILE>] MESSAGE ...
```option | description
------------------------|-------------
-e, --endpoint=ENDPOINT | ZeroMQ socket endpoint
-t, --type=TYPE | ZeroMQ type [PUSH|PUB|REQ|STREAM]
-l, --log=FILE | log file <default: none(stderr)>## Examples
Server side process.
```
% cat > echo.sh <<EOF
#!/bin/sh
if [ -p /dev/stdin ]; then
cat -
fi
echo
exit 0
EOF
% chmod 755 echo.sh
% zmq-server -e tcp://127.0.0.1:5555 -t pull -S ./echo.sh
```Client side process.
send to `test` message.
```
% zmq-client -e tcp://127.0.0.1:5555 -t push test
```