Skip to content

Commit e59a83b

Browse files
Ayanda-Dmergify[bot]
authored andcommitted
add debug log on queue expiry
(cherry picked from commit c1bf462)
1 parent 38a79db commit e59a83b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

deps/rabbit/src/rabbit_amqqueue_process.erl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,9 +1691,12 @@ handle_cast({sync_start, _, _}, State = #q{q = Q}) ->
16911691
Name, "Stopping after receiving sync_start from another master", []),
16921692
stop(State).
16931693

1694-
handle_info({maybe_expire, Vsn}, State = #q{args_policy_version = Vsn}) ->
1694+
handle_info({maybe_expire, Vsn}, State = #q{q = Q, expires = Expiry, args_policy_version = Vsn}) ->
16951695
case is_unused(State) of
1696-
true -> stop(State);
1696+
true ->
1697+
QResource = rabbit_misc:rs(amqqueue:get_name(Q)),
1698+
rabbit_log_queue:debug("Deleting '~ts' on expiry after ~tp milliseconds", [QResource, Expiry]),
1699+
stop(State);
16971700
false -> noreply(State#q{expiry_timer_ref = undefined})
16981701
end;
16991702

0 commit comments

Comments
 (0)