anchor.diff:          {ok, QName2} ->
               {ok, Method#'basic.consume'{queue = QName2}};
           {error, QName} ->
  -            {error, rabbit_misc:format("Error finding sharded queue for: ~p", [QName])}
  +            {error, format("Error finding sharded queue for: ~p", [QName])}
       end;
   
   intercept(#'basic.get'{queue = QName} = Method, VHost) ->
  
positive.code:         {ok, QName2} ->
              {ok, Method#'basic.get'{queue = QName2}};
          {error, QName} ->
              {error, rabbit_misc:format("Error finding sharded queue for: ~p", [QName])}
      end;
  
  intercept(#'queue.delete'{queue = QName} = Method, VHost) ->
      case is_sharded(VHost, QName) of
          true ->
              {error, rabbit_misc:format("Can't delete sharded queue: ~p", [QName])};
          _    ->
              {ok, Method}
      end;
  
negative.code: -export([consumer_count/1]).
  
  -import(rabbit_sharding_util, [a2b/1, shards_per_node/1]).
  -import(rabbit_misc, [r/3, format/2]).
  
  -rabbit_boot_step({?MODULE,
                     [{description, "sharding interceptor"},
                      {mfa, {rabbit_registry, register,
                             [channel_interceptor,
                              <<"sharding interceptor">>, ?MODULE]}},
                      {cleanup, {rabbit_registry, unregister,
                                 [channel_interceptor,
                                  <<"sharding interceptor">>]}},
                      {requires, rabbit_registry},
                      {enables, recovery}]}).
  
  