Skip to content

Commit 1b5f8c3

Browse files
committed
Shovel bugfix: Autodelete amqp10 shovel with 0 messages to transfer
1 parent 9eaf9af commit 1b5f8c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

deps/rabbitmq_shovel/src/rabbit_amqp10_shovel.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ init_source(State = #{source := #{current := #{link := Link},
148148
#{delete_after := Rem} -> Rem;
149149
_ -> unlimited
150150
end,
151+
case Remaining of
152+
0 -> exit({shutdown, autodelete});
153+
_ -> ok
154+
end,
151155
State#{source => Src#{remaining => Remaining,
152156
remaining_unacked => Remaining,
153157
last_acked_tag => -1}}.

0 commit comments

Comments
 (0)