-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrabbit_schema_initialize.sh
executable file
·22 lines (18 loc) · 2.05 KB
/
rabbit_schema_initialize.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh
user=guest
password=guest
host=127.0.0.1
port=15672
curl -i -u $user:$password -H "content-type:application/json" -XPUT -d'{"durable":true}' http://$host:$port/api/queues/%2f/queue_1
curl -i -u $user:$password -H "content-type:application/json" -XPUT -d'{"durable":true}' http://$host:$port/api/queues/%2f/queue_2
curl -i -u $user:$password -H "content-type:application/json" -XPUT -d'{"durable":true}' http://$host:$port/api/queues/%2f/queue_3
curl -i -u $user:$password -H "content-type:application/json" -XPUT -d'{"type":"fanout","auto_delete":false,"durable":true,"internal":false,"arguments":{}}' http://$host:$port/api/exchanges/%2f/boksh_fanout
curl -i -u $user:$password -H "content-type:application/json" -XPOST http://$host:$port/api/bindings/%2f/e/boksh_fanout/q/queue_1
curl -i -u $user:$password -H "content-type:application/json" -XPOST http://$host:$port/api/bindings/%2f/e/boksh_fanout/q/queue_2
curl -i -u $user:$password -H "content-type:application/json" -XPOST http://$host:$port/api/bindings/%2f/e/boksh_fanout/q/queue_3
curl -i -u $user:$password -H "content-type:application/json" -XPUT -d'{"type":"direct","auto_delete":false,"durable":true,"internal":false,"arguments":{}}' http://$host:$port/api/exchanges/%2f/boksh_direct
curl -i -u $user:$password -H "content-type:application/json" -XPOST -d'{"routing_key":"to_queue_1"}' http://$host:$port/api/bindings/%2f/e/boksh_direct/q/queue_1
curl -i -u $user:$password -H "content-type:application/json" -XPOST -d'{"routing_key":"to_queue_2"}' http://$host:$port/api/bindings/%2f/e/boksh_direct/q/queue_2
curl -i -u $user:$password -H "content-type:application/json" -XPOST -d'{"routing_key":"to_queue_3"}' http://$host:$port/api/bindings/%2f/e/boksh_direct/q/queue_3
curl -i -u $user:$password -H "content-type:application/json" -XPOST -d'{"routing_key":"to_queue_1_and_3"}' http://$host:$port/api/bindings/%2f/e/boksh_direct/q/queue_1
curl -i -u $user:$password -H "content-type:application/json" -XPOST -d'{"routing_key":"to_queue_1_and_3"}' http://$host:$port/api/bindings/%2f/e/boksh_direct/q/queue_3