Skip to content

Commit 0c4ec95

Browse files
committed
Shovel bugfix: use 'last_acked_tag' to keep track of acked/nacked messages
1 parent f1a7020 commit 0c4ec95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

deps/rabbitmq_shovel/src/rabbit_amqp10_shovel.erl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,12 +307,12 @@ ack(Tag, false, State = #{source := #{current := #{link := LinkRef}} = Src}) ->
307307
nack(Tag, false, State = #{source := #{current := #{link := LinkRef}} = Src}) ->
308308
% the tag is the same as the deliveryid
309309
ok = amqp10_client_session:disposition(LinkRef, Tag, Tag, true, rejected),
310-
State#{source => Src#{last_nacked_tag => Tag}};
310+
State#{source => Src#{last_acked_tag => Tag}};
311311
nack(Tag, true, State = #{source := #{current := #{link := LinkRef},
312-
last_nacked_tag := LastTag} = Src}) ->
312+
last_acked_tag := LastTag} = Src}) ->
313313
First = LastTag + 1,
314314
ok = amqp10_client_session:disposition(LinkRef, First, Tag, true, rejected),
315-
State#{source => Src#{last_nacked_tag => Tag}}.
315+
State#{source => Src#{last_acked_tag => Tag}}.
316316

317317
status(#{dest := #{current := #{link_state := attached}}}) ->
318318
flow;

0 commit comments

Comments
 (0)