updates examples
This commit is contained in:
parent
6935e1d1cb
commit
a99f3a5c7b
|
|
@ -5,5 +5,5 @@ curl -i -u guest:guest -H "content-type:application/json" \
|
|||
-XPUT -d'{"type":"x-consistent-hash","durable":true}' \
|
||||
http://localhost:15672/api/exchanges/%2f/rkey.ex
|
||||
|
||||
$CTL set_parameter sharding-definition rkey '{"shards-per-node": 2, "routing-key": "1234"}'
|
||||
$CTL set_parameter sharding-definition rkey '{"sharded": true, "shards-per-node": 2, "routing-key": "1234"}'
|
||||
$CTL set_policy rkey-shard "^rkey\." '{"sharding-definition": "rkey"}'
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@
|
|||
CTL=$1
|
||||
|
||||
$CTL set_parameter sharding routing-key '"4321"'
|
||||
$CTL set_parameter sharding-definition rkey2 '{"guest", "shards-per-node": 2}'
|
||||
$CTL set_parameter sharding-definition rkey2 '{"sharded": true, "shards-per-node": 2}'
|
||||
$CTL set_policy rkey2-shard "^rkey2\." '{"sharding-definition": "rkey2"}'
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ curl -i -u guest:guest -H "content-type:application/json" \
|
|||
-XPUT -d'{"type":"x-consistent-hash","durable":true}' \
|
||||
http://localhost:15672/api/exchanges/%2f/sharding.test
|
||||
|
||||
$CTL set_parameter sharding-definition spn_test '{"routing-key": "1234"}'
|
||||
$CTL set_parameter sharding-definition spn_test '{"sharded": true, "routing-key": "1234"}'
|
||||
$CTL set_parameter sharding shards-per-node "3"
|
||||
$CTL set_policy spn_test "^sharding\." '{"sharding-definition": "spn_test"}'
|
||||
$CTL clear_parameter sharding shards-per-node
|
||||
$CTL clear_parameter sharding shards-per-node
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
CTL=$1
|
||||
|
||||
$CTL set_parameter sharding-definition my_shard '{"guest", "shards-per-node": 4}'
|
||||
$CTL set_parameter sharding-definition my_shard '{"sharded": true, "shards-per-node": 4}'
|
||||
$CTL set_policy my_shard "^shard\." '{"sharding-definition": "my_shard"}'
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ 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 '{"shards-per-node": 3}'
|
||||
$CTL set_parameter sharding-definition 3_shard '{"sharded": true, "shards-per-node": 3}'
|
||||
$CTL set_policy 3_shard "^three\." '{"sharding-definition": "3_shard"}'
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ 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 '{"shards-per-node": 3}'
|
||||
$CTL set_parameter sharding-definition 3_shard '{"sharded": true, "shards-per-node": 3}'
|
||||
$CTL set_policy 3_shard "^three\." '{"sharding-definition": "3_shard"}'
|
||||
|
||||
$CTL set_parameter sharding-definition 3_shard '{"shards-per-node": 5}'
|
||||
$CTL set_policy 3_shard "^three\." '{"sharding-definition": "3_shard"}'
|
||||
$CTL set_parameter sharding-definition 3_shard '{"sharded": true, "shards-per-node": 5}'
|
||||
$CTL set_policy 3_shard "^three\." '{"sharding-definition": "3_shard"}'
|
||||
|
|
|
|||
Loading…
Reference in New Issue