anchor.diff:  -module(rabbit_sharding_util).
   
  --export([shard/1, rpc_call/2, sharded_exchanges/1]).
  --export([get_policy/1, exchange_bin/1, make_queue_name/3, a2b/1]).
  --export([shards_per_node/1, routing_key/1]).
  +-export([shard/1, sharded_exchanges/1]).
  +-export([get_policy/1, shards_per_node/1, routing_key/1]).
  +-export([exchange_bin/1, make_queue_name/3]).
  +-export([a2b/1, rpc_call/2]).
   
   -include_lib("amqp_client/include/amqp_client.hrl").
   -include ("rabbit_sharding.hrl").
  
positive.code: routing_key(X) ->
      get_parameter(<<"routing-key">>, X, ?DEFAULT_RK).
  
  get_policy(X) ->
      rabbit_policy:get(<<"sharding-definition">>, X).
  
  exchange_bin(#resource{name = XBin}) -> XBin.
  
  a2b(A) -> list_to_binary(atom_to_list(A)).
  
  
negative.code: sharded_exchanges(VHost) ->
      [X || X <- find_exchanges(VHost), shard(X)].
  
  get_policy(X) ->
      rabbit_policy:get(<<"sharding-definition">>, X).
  
  shards_per_node(X) ->
      get_parameter(<<"shards-per-node">>, X, ?DEFAULT_SHARDS_NUM).
  