anchor.diff:       end,
       {ok,{reply,ok},S1}.
   
  -handle_ack(ClientId,AckSeq,S = #state{queue = SQ}) ->
  -    S#state{queue = shared_queue:move(ClientId,AckSeq,SQ)}.
  +handle_ack(ClientId,AckSeq,S = #state{queue = SQ,garbage = Garbage}) ->
  +    {MoreGarbage,SQ1} = shared_queue:move(ClientId,AckSeq,SQ),
  +    S#state{queue = SQ1,garbage = ?MONOID:as(Garbage,MoreGarbage)}.
   
   
   %%maybe_process_pending1(PSeq,Ack,Wnd,Sub = #sub{last_sent = LSent,
  
positive.code: recover(S,SubRecord) ->
      lists:foldl(fun set_sub/2,S,SubRecord).
  
  maybe_demonitor_reg(undefined,Mons) ->
      Mons;
  maybe_demonitor_reg(Ref,Mons)       ->
  
negative.code: %% Setting Subscriptions
  %% ===================================================================
  
  set_sub({ClientId,QoS,ClientSeq,FromSeq,Pid},S = #state{monref_idx = Mons,
                                                          live_subs = Subs,
                                                          queue = SQ}) ->
      M = monitor(process,Pid),
      Reg = #sub{client_seq = ClientSeq,
                 qos = QoS,
                 pid = Pid,
                 monref = M},
      S#state{live_subs = dict:store(ClientId,Reg,Subs),
              monref_idx = dict:store(M, ClientId, Mons),
              queue = shared_queue:add(ClientId,FromSeq,SQ)}.
  
  maybe_remove_downed(MonRef,S = #state{filter = Filter,
                                        live_subs = Subs,
  