anchor.diff:  -behaviour(cowboy_http_handler). %% To handle the default route
   
   %% Application callbacks
  --export([start/0, start/2, stop/1, subscribe/4]).
  +-export([start/0, start/2, stop/1, loop/2]).
   
   %% Cowboy callbacks
   -export([init/3, handle/2, terminate/2]).
  
positive.code:                                     auto_delete = true},
      #'exchange.declare_ok'{} = amqp_channel:call(Channel, Declare), 
  
      loop(Conn, Subscriber).
  
  %%--------------------------------------------------------------------
  %% Function: bind_queue(Channel, Exchange, Routing, Consumer) -> pid()
  
negative.code:         nomatch     -> Private = false
      end,
  
      Consumer = subscribe(Conn, Channel, Exchange, From),
  
      Conn:send(<<"broker:subscription_succeeded">>, <<>>),
      
      {ok, #subscription{ channel     = Channel, 
                          exchange    = Exchange,
                          private     = Private,
                          consumer    = Consumer}};
  
  %%--------------------------------------------------------------------
  %% Function: handle_subscription(Conn, {bind, Event, _From}, State) -> 
  