anchor.diff:      QueueOpts = maps:merge(#{clean_session => false}, vmq_queue:default_opts()),
       SessionPid1 = spawn(fun() -> mock_session(Parent) end),
   
  -    {ok, QPid} = vmq_reg:register_subscriber_(SessionPid1, SubscriberId, QueueOpts),
  +    {ok, QPid} = vmq_reg_leader:register_subscriber(SessionPid1, SubscriberId, QueueOpts),
       ok = vmq_reg:subscribe(false, <<"mock-user">>, SubscriberId,
                              [{[<<"test">>, <<"fifo">>, <<"topic">>], 1}]),
       %% teardown session
  
positive.code:     %% teardown session
      SessionPid1 ! go_down,
      timer:sleep(10),
      {offline, fanout, 0, 0} = vmq_queue:status(QPid1),
  
      %% fill the offline queue
      ok = vmq_reg:publish(Msg),
      {offline, fanout, 1, 0} = vmq_queue:status(QPid1),
  
      %% crash the queue
      catch gen_fsm:sync_send_all_state_event(QPid1, byebye),
      false = is_process_alive(QPid1),
      timer:sleep(10),
      NewQPid = vmq_reg:get_queue_pid(SubscriberId),
      {offline, fanout, 1, 0} = vmq_queue:status(NewQPid),
  
      %% reconnect
      SessionPid2 = spawn(fun() -> mock_session(Parent) end),
      {ok, NewQPid} = vmq_reg:register_subscriber_(SessionPid2, SubscriberId, QueueOpts),
      receive_persisted_msg(NewQPid, 1, Msg),
      {online, fanout, 0, 1} = vmq_queue:status(NewQPid),
      {ok, []} = vmq_lvldb_store:msg_store_find(SubscriberId).
  
  queue_fifo_test(_) ->
  
negative.code:                                                        max_offline_messages => 10}),
      SessionPid1 = spawn(fun() -> mock_session(Parent) end),
  
      {ok, QPid} = vmq_reg_leader:register_subscriber(SessionPid1, SubscriberId, QueueOpts),
      ok = vmq_reg:subscribe(false, <<"mock-user">>, SubscriberId, [{[<<"test">>, <<"fifo">>, <<"topic">>], 1}]),
      %% teardown session
      SessionPid1 ! go_down,
      timer:sleep(10),
  
      Msgs = publish_multi([<<"test">>, <<"fifo">>, <<"topic">>]), % publish 100, only the first 10 are kept
      {offline, fanout, 10, 0, false} = vmq_queue:status(QPid),
  
      SessionPid2 = spawn(fun() -> mock_session(Parent) end),
      {ok, QPid} = vmq_reg_leader:register_subscriber(SessionPid2, SubscriberId, QueueOpts),
      {KeptMsgs, _} = lists:split(10, Msgs),
      ok = receive_multi(QPid, 1, KeptMsgs),
      {ok, []} = vmq_lvldb_store:msg_store_find(SubscriberId).
  