anchor.diff:  
   -export([open/1,
            close/2,
  -         publish/2]).
  +         publish/5]).
  +
  +-include_lib("amqp_client/include/amqp_client.hrl").
   
   %% @spec open(VHost) -> Result
   %% @where
  
positive.code: %% @doc Publish a message to RabbitMQ using the internal channel
  %% @end
  %%
  pubilsh(Channel, X, Key, Headers, Body) ->
    BasicPublish = #'basic.publish'{exchange=X, routing_key=Key},
    Properties = #'P_basic'{app_id = <<"pgsql-listen-exchange">>,
                            delivery_mode = 1,
                            headers = Headers,
                            timestamp = current_timestamp()},
    case amqp_channel:call(Chan,
                            BasicPublish,
                            #amqp_msg{props=Properties, payload=Body}) of
        ok -> ok;
        Other -> {error, Other}
    end.
  
negative.code: %% @end
  %%
  open(VHost) ->
    AdapterInfo = #amqp_adapter_info{name = <<"pgsql_listen_worker">>},
    case amqp_connection:start(#amqp_params_direct{virtual_host=VHost,
                                                   adapter_info=AdapterInfo}) of
      {ok, Connection} ->
        {ok, Channel} = amqp_connection:open_channel(Connection),
        {ok, Connection, Channel};
      {error, Error} ->
        {error, Error}
    end.
  