rabbitmq-server/deps/rabbitmq_sharding/etc/three-queues.sh

10 lines
358 B
Bash
Executable File

#!/bin/sh
CTL=$1
curl -i -u guest:guest -H "content-type:application/json" \
-XPUT -d'{"type":"x-consistent-hash","durable":true}' \
http://localhost:15672/api/exchanges/%2f/three.ex
$CTL set_parameter sharding-definition 3_shard '{"sharded": true, "shards-per-node": 3}'
$CTL set_policy 3_shard "^three\." '{"sharding-definition": "3_shard"}'