Skip to content

Instantly share code, notes, and snippets.

@wizardjedi
Forked from matwey/send.sh
Created January 25, 2018 15:06
Show Gist options
  • Save wizardjedi/9ffca2ef79de0c1bce74ace3871e36c7 to your computer and use it in GitHub Desktop.
Save wizardjedi/9ffca2ef79de0c1bce74ace3871e36c7 to your computer and use it in GitHub Desktop.
Send binary payloaded message to AMQP unsing rabbitmq rest-api.
#!/bin/sh
BODY='\00\00\00\01\00\00\00\00'
BODY64=$(echo -ne $BODY | base64)
S='{"properties":{},"routing_key":"test","payload":"'$BODY64'","payload_encoding":"base64"}'
echo $S | curl --data-binary @- -i -u guest:guest http://192.168.185.182:15672/api/exchanges/%2f/amq.default/publ ish -X POST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment