anchor.diff:              {stop, Reason, State}
       end;
   
  -handle_info(timeout, #state{node=Node, subscriber_id=SubscriberId}= State) ->
  +handle_info(deliver_from_store, #state{node=Node,
  +                                       subscriber_id=SubscriberId} = State) ->
       Self = self(),
       {ReplPid, ReplMon} =
       case node() of
  
positive.code:     {noreply, State#state{waiting=undefined}}.
  
  handle_info({'DOWN', _MRef, process, Pid, Reason}, State) ->
      #state{repl_pid=ReplPid, subscriber_id=SubscriberId} = State,
      case {Pid == ReplPid, Reason} of
          {true, normal} ->
              %% finished replicating
              {stop, normal, State};
          {true, OtherReason} ->
              lager:warning("replication process for subscriber ~p died due to ~p",
                           [SubscriberId, OtherReason]),
  
negative.code:                 subscriber_id,
                  waiting}).
  
  -define(RETRY, 10000). % wait 10 seconds to retry
  
  %%%===================================================================
  %%% API
  %%%===================================================================
  