Skip to content

Instantly share code, notes, and snippets.

@bthelen
bthelen / bet-rabbit-requeue-example.txt
Created April 12, 2018 14:10
Example steps to show how to view RabbitMQ messages without totally removing them
#Run RabbitMQ
docker run -d --hostname my-rabbit -p 15672:15672 rabbitmq:3-management
#Make a queue called foo
curl -s -u guest:guest -H "content-type:application/json" -X PUT http://127.0.0.1:15672/api/queues/%2F/foo
#Put some messages
curl -u guest:guest -H "content-type:application/json" -X POST http://localhost:15672/api/exchanges/%2f/amq.default/publish -d'{"properties":{"delivery_mode":2},"routing_key":"foo","payload":"aaaaaa","payload_encoding":"string"}'
curl -u guest:guest -H "content-type:application/json" -X POST http://localhost:15672/api/exchanges/%2f/amq.default/publish -d'{"properties":{"delivery_mode":2},"routing_key":"foo","payload":"bbbbbb","payload_encoding":"string"}'