Skip to content

Instantly share code, notes, and snippets.

@matwey
Created February 8, 2014 11:26
Show Gist options
  • Save matwey/8882327 to your computer and use it in GitHub Desktop.
Save matwey/8882327 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
@wizardjedi
Copy link

Great works. Thanks a lot!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment