anchor.diff:  
           end
   
  -        || _Subscr={TopicMatch, {Mod,Fun,Pid}, _Fields} <- MatchList
  +        || _Subscr={TopicMatch, SQos, {Mod,Fun,Pid}, _Fields} <- MatchList
       ],
   
       ok.
  
positive.code:                         lager:debug("client ~p disconnected while sending message", [Pid]),
  %                        mqtt_topic_registry:unsubscribe(Subscr),
  %                        mqtt_offline:register(Topic, DeviceID),
                          mqtt_offline:event(undefined, {Topic, Qos}, Content),
                          ok;
  
                      _ ->
  
negative.code:         case is_process_alive(Pid) of
              true ->
                  lager:info("candidate: pid=~p, topic=~p, content=~p", [Pid, Topic, Content]),
                  Ret = Mod:Fun(Pid, {Topic,TopicMatch}, Content, SQos),
                  lager:info("publish to client: ~p", [Ret]),
                  case {SQos, Ret} of
                      {0, disconnect} ->
                          lager:debug("client ~p disconnected but QoS = 0. message dropped", [Pid]);
  
  