1234567891011 |
- #!/bin/bash
- ROOT=$(cd `dirname $0`/../../; pwd)
- TOPIC=topic1
- URL=http://127.0.0.1:9051/pub?topic=$TOPIC
- echo url: $URL
- DATE=$(date "+%Y-%m-%d %H:%M:%S").$((`date "+%-N"`/1000000))
- echo date: $DATE
- MSG="{\"msg\":\"topic1 message\", \"date\":\"$DATE\", \"priority\":1}"
- echo MSGS: $MSG
- curl -d "$MSG" $URL
|