Skip to content

Commit 447fac9

Browse files
Merge pull request #11583 from rabbitmq/remove-cancel-on-ha-failover
Remove x-cancel-on-ha-failover
2 parents 166e5d8 + 756d357 commit 447fac9

File tree

3 files changed

+3
-24
lines changed

3 files changed

+3
-24
lines changed

deps/rabbit/src/rabbit_amqqueue.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,6 @@ declare_args() ->
877877
{<<"x-queue-leader-locator">>, fun check_queue_leader_locator_arg/2}].
878878

879879
consume_args() -> [{<<"x-priority">>, fun check_int_arg/2},
880-
{<<"x-cancel-on-ha-failover">>, fun check_bool_arg/2},
881880
{<<"x-stream-offset">>, fun check_stream_offset_arg/2}].
882881

883882
check_int_arg({Type, _}, _) ->

deps/rabbit/src/rabbit_channel.erl

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1752,20 +1752,8 @@ handle_consuming_queue_down_or_eol(QName,
17521752
{ok, CTags} -> CTags
17531753
end,
17541754
gb_sets:fold(
1755-
fun (CTag, StateN = #ch{consumer_mapping = CMap}) ->
1756-
case queue_down_consumer_action(CTag, CMap) of
1757-
remove ->
1758-
cancel_consumer(CTag, QName, StateN);
1759-
{recover, {NoAck, ConsumerPrefetch, Exclusive, Args}} ->
1760-
case catch basic_consume(
1761-
QName, NoAck, ConsumerPrefetch, CTag,
1762-
Exclusive, Args, true, StateN) of
1763-
{ok, StateN1} ->
1764-
StateN1;
1765-
_Err ->
1766-
cancel_consumer(CTag, QName, StateN)
1767-
end
1768-
end
1755+
fun (CTag, StateN = #ch{}) ->
1756+
cancel_consumer(CTag, QName, StateN)
17691757
end, State#ch{queue_consumers = maps:remove(QName, QCons)}, ConsumerTags).
17701758

17711759
%% [0] There is a slight danger here that if a queue is deleted and
@@ -1788,13 +1776,6 @@ cancel_consumer(CTag, QName,
17881776
{queue, QName}]),
17891777
State#ch{consumer_mapping = maps:remove(CTag, CMap)}.
17901778

1791-
queue_down_consumer_action(CTag, CMap) ->
1792-
{_, {_, _, _, Args} = ConsumeSpec} = maps:get(CTag, CMap),
1793-
case rabbit_misc:table_lookup(Args, <<"x-cancel-on-ha-failover">>) of
1794-
{bool, true} -> remove;
1795-
_ -> {recover, ConsumeSpec}
1796-
end.
1797-
17981779
binding_action_with_checks(
17991780
Action, SourceNameBin0, DestinationType, DestinationNameBin0,
18001781
RoutingKey, Arguments, VHostPath, ConnPid, AuthzContext,

deps/rabbit/src/rabbit_classic_queue.erl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,7 @@ capabilities() ->
518518
<<"x-overflow">>, <<"x-queue-mode">>, <<"x-queue-version">>,
519519
<<"x-single-active-consumer">>, <<"x-queue-type">>,
520520
<<"x-queue-master-locator">>],
521-
consumer_arguments => [<<"x-cancel-on-ha-failover">>,
522-
<<"x-priority">>, <<"x-credit">>],
521+
consumer_arguments => [<<"x-priority">>, <<"x-credit">>],
523522
server_named => true}.
524523

525524
notify_decorators(Q) when ?is_amqqueue(Q) ->

0 commit comments

Comments
 (0)