- #!/bin/bash
- # ROOT=$(cd `dirname $0`/../../; pwd)
- ROOT=$(cd `dirname $0`/; pwd)
- TOPIC=test
- URL=http://127.0.0.1:9051/mpub?topic=$TOPIC
- echo url: $URL
- DATE=$(date "+%Y-%m-%d %H:%M:%S").$((`date "+%N"`/1000000))
- echo date: $DATE
- MSG="hello world 1 \n hello world 2\nhello world 3 date:$DATE"
- echo MSGS: $MSG
- curl -d "$MSG" $URL
|