anchor.diff:  	lager:debug("topics= ~p", [Topics]),
   	{ok, [{msgid, MsgID},{topics, Topics}]};
   
  -decode_payload('UNSUBSCRIBE', _Qos, {_Len, <<MsgID:16, Payload/binary>>}) ->
  +decode_payload('UNSUBSCRIBE', _, {_Len, <<MsgID:16, Payload/binary>>}) ->
       lager:debug("UNSUBSCRIBE: ~p", [Payload]),
       case MsgID of
           0 -> erlang:throw({'UNSUBSCRIBE', "2.3.1-1", "null msgid"});
  
positive.code:     lager:debug("SUBACK. MsgID= ~p", [MsgID]),
      {ok, [{msgid, MsgID}]};
  
  decode_payload(Cmd, Qos, Args) ->
      lager:info("invalid command ~p (qos=~p, payload=~p)", [Cmd, Qos, Args]),
  
      {error, disconnect}.
  
  
negative.code:     lager:debug("CONNACK"),
      {ok, [{retcode, RetCode}]};
  
  decode_payload('PUBACK', _, {_Len=2, <<MsgID:16>>}) ->
      lager:debug("PUBACK. MsgID= ~p", [MsgID]),
      {ok, [{msgid, MsgID}]};
  
  decode_payload('PUBREC', _, {_Len, <<MsgID:16>>}) ->
      lager:debug("PUBREC. MsgID= ~p", [MsgID]),
      {ok, [{msgid, MsgID}]};
  
  % TODO: throw exception with custom message when 'PUBREL' and qos != 1
  decode_payload('PUBREL', {_, _Qos=1, _}, {_Len, <<MsgID:16>>}) ->
      lager:debug("PUBREL. MsgID= ~p", [MsgID]),
      {ok, [{msgid, MsgID}]};
  
  decode_payload('PUBCOMP', _, {_Len, <<MsgID:16>>}) ->
      lager:debug("PUBREL. MsgID= ~p", [MsgID]),
      {ok, [{msgid, MsgID}]};
  
  