Created
July 4, 2018 21:26
-
-
Save wederbrand/56792c2968fb74540a089e98cb9a15a7 to your computer and use it in GitHub Desktop.
rabbit flow test
This file contains 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 | |
# start rabbit | |
docker rm -f rabbit | |
date | |
docker run \ | |
-d \ | |
-p 15671:15671 \ | |
-p 15672:15672 \ | |
--hostname rabbit \ | |
--name rabbit \ | |
--cpus=0.1 \ | |
rabbitmq:3.6.5-management | |
date | |
sleep 20 | |
date | |
# create an exchange | |
curl -i -u guest:guest -H "content-type:application/json" \ | |
-XPUT -d'{"type":"direct","durable":true}' \ | |
http://localhost:15672/api/exchanges/%2f/myexchange | |
# creata a queue | |
curl -i -u guest:guest -H "content-type:application/json" \ | |
-XPUT -d'{"durable":true}' \ | |
http://localhost:15672/api/queues/%2f/myqueue | |
for i in $(seq 1 10000); do | |
# bind to that queue | |
curl -i -u guest:guest -H "content-type:application/json" \ | |
-XPOST -d'{"routing_key":"dude.'$i'.#","arguments":{}}' \ | |
http://localhost:15672/api/bindings/%2f/e/myexchange/q/myqueue | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment