Created
August 15, 2014 09:58
-
-
Save loa/b8cf4f407480d954fb36 to your computer and use it in GitHub Desktop.
Netcat send to Stomp MQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# make sure netcat is installed | |
which nc || yum install -y nc | |
HOST="localhost" | |
PORT="61613" | |
LOGIN="guest" | |
PASSCODE="guest" | |
CHANNEL="stomp" | |
MSG="$1" | |
echo -en "CONNECT | |
login:${LOGIN} | |
passcode:${PASSCODE} | |
\x00 | |
SEND | |
destination:/queue/${CHANNEL} | |
receipt: | |
${MSG} | |
\x00 | |
" | nc $HOST $PORT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment