Created
August 19, 2015 16:30
-
-
Save blasterpal/79603af49bfe45acc21c to your computer and use it in GitHub Desktop.
Create RabbitQ queue, exchange and bind to routing key w/ Curl.
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
| # create queue | |
| # /api/queues/vhost/name | |
| curl -i -u $AMQP_USER:$AMQP_PASSWORD -H "content-type:application/json" \ | |
| -XPUT -d'{"auto_delete":false,"durable":true,"arguments":[]}' \ | |
| "http://$AMQP_HOST:$RABBIT_MGT_PORT/api/queues/%2F/$SCHEDULER_TRIGGER_QUEUE" | |
| # create exchange | |
| # PUT /api/exchanges/vhost/name | |
| curl -i -u $AMQP_USER:$AMQP_PASSWORD -H "content-type:application/json" \ | |
| -XPUT -d'{"type":"direct","auto_delete":false,"durable":true,"arguments":[]}' \ | |
| "http://$AMQP_HOST:$RABBIT_MGT_PORT/api/exchanges/%2F/$AMQP_EXCHANGE" | |
| # bind queue and routing | |
| # /api/bindings/vhost/queue/exchange | |
| # /api/bindings/vhost/e/exchange/q/queue | |
| curl -i -u guest:guest -H "content-type:application/json" \ | |
| -XPOST -d "{\"routing_key\":\"$SCHEDULER_TRIGGER_QUEUE\"}" \ | |
| "http://$AMQP_HOST:$RABBIT_MGT_PORT/api/bindings/%2F/e/$AMQP_EXCHANGE/q/$SCHEDULER_TRIGGER_QUEUE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment