anchor.diff:      subscribe/3,
       unsubscribe/2,
       publish/4,
  +    publish/5,
       disconnect/1,
       call/2,
       cast/2]).
  
positive.code:         0 ->
              State#state{info_fun=NewInfoFun};
          _ ->
              Msg = {publish, MsgId, Topic, Payload, QoS, true},
              Key = {publish, MsgId},
              Ref = gen_fsm:send_event_after(RetryInterval, {retry, Key}),
              State#state{waiting_acks=store(Key, {Ref, Msg}, WAcks),
  
negative.code:     gen_fsm:start(Name, ?MODULE, [Module, Args, Opts], GenFSMOpts).
  
  publish(P, Topic, Payload, Qos) ->
      gen_fsm:send_event(P, {publish, Topic, Payload, Qos, false, false}).
  
  publish(P, Topic, Payload, Qos, Retain) ->
      gen_fsm:send_event(P, {publish, Topic, Payload, Qos, Retain, false}).
  
  subscribe(P, [T|_] = Topics) when is_tuple(T) ->
      gen_fsm:send_event(P, {subscribe, Topics}).
  