@@ -464,7 +464,7 @@ apply(_, {down, ConsumerPid, noconnection},
464464 % % TODO: need to increment credit here
465465 % % with the size of the Checked map
466466 Credit = increase_credit (C , maps :size (Checked0 )),
467- Eff1 = ConsumerUpdateActiveFun (St , K , C , false , Eff ),
467+ Eff1 = ConsumerUpdateActiveFun (St , K , C , false , suspected_down , Eff ),
468468 {maps :put (K , C # consumer {suspected_down = true ,
469469 credit = Credit ,
470470 checked_out = #{}}, Co ),
@@ -531,7 +531,7 @@ apply(_, {nodeup, Node}, #state{consumers = Cons0,
531531 {Cons1 , SQ , Effects } =
532532 maps :fold (fun ({_ , P } = ConsumerId , C , {CAcc , SQAcc , EAcc })
533533 when node (P ) =:= Node ->
534- EAcc1 = ConsumerUpdateActiveFun (State0 , ConsumerId , C , true , EAcc ),
534+ EAcc1 = ConsumerUpdateActiveFun (State0 , ConsumerId , C , true , up , EAcc ),
535535 update_or_remove_sub (
536536 ConsumerId , C # consumer {suspected_down = false },
537537 CAcc , SQAcc , EAcc1 );
@@ -548,11 +548,11 @@ apply(_, #update_config{config = Conf}, State) ->
548548 {update_config (Conf , State ), ok }.
549549
550550consumer_active_flag_update_function (# state {consumer_strategy = default }) ->
551- fun (State , ConsumerId , Consumer , Active , Effects ) ->
552- consumer_update_active_effects (State , ConsumerId , Consumer , Active , Effects )
551+ fun (State , ConsumerId , Consumer , Active , ActivityStatus , Effects ) ->
552+ consumer_update_active_effects (State , ConsumerId , Consumer , Active , ActivityStatus , Effects )
553553 end ;
554554consumer_active_flag_update_function (# state {consumer_strategy = single_active }) ->
555- fun (_ , _ , _ , _ , Effects ) ->
555+ fun (_ , _ , _ , _ , _ , Effects ) ->
556556 Effects
557557 end .
558558
@@ -869,7 +869,8 @@ cancel_consumer(ConsumerId,
869869 service_queue = ServiceQueue1 ,
870870 waiting_consumers = RemainingWaitingConsumers },
871871 Effects2 = consumer_update_active_effects (State , NewActiveConsumerId ,
872- NewActiveConsumer , true , Effects1 ),
872+ NewActiveConsumer , true ,
873+ single_active , Effects1 ),
873874 {State , Effects2 };
874875 error ->
875876 % The cancelled consumer is not the active one
@@ -883,15 +884,16 @@ cancel_consumer(ConsumerId,
883884 end .
884885
885886consumer_update_active_effects (# state {queue_resource = QName },
886- ConsumerId , # consumer {meta = Meta }, Active ,
887+ ConsumerId , # consumer {meta = Meta },
888+ Active , ActivityStatus ,
887889 Effects ) ->
888890 Ack = maps :get (ack , Meta , undefined ),
889891 Prefetch = maps :get (prefetch , Meta , undefined ),
890892 Args = maps :get (args , Meta , []),
891893 [{mod_call ,
892894 rabbit_quorum_queue ,
893895 update_consumer_handler ,
894- [QName , ConsumerId , false , Ack , Prefetch , Active , Args ]}
896+ [QName , ConsumerId , false , Ack , Prefetch , Active , ActivityStatus , Args ]}
895897 | Effects ].
896898
897899cancel_consumer0 (ConsumerId ,
0 commit comments