Skip to content

Commit 1471f23

Browse files
committed
Shovel bugfix: requeue rejected messages with AMQP1.0
1 parent 059813a commit 1471f23

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deps/rabbitmq_shovel/src/rabbit_amqp10_shovel.erl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,12 @@ ack(Tag, false, State = #{source := #{current := #{link := LinkRef}} = Src}) ->
306306
-spec nack(Tag :: tag(), Multi :: boolean(), state()) -> state().
307307
nack(Tag, false, State = #{source := #{current := #{link := LinkRef}} = Src}) ->
308308
% the tag is the same as the deliveryid
309-
ok = amqp10_client_session:disposition(LinkRef, Tag, Tag, true, rejected),
309+
ok = amqp10_client_session:disposition(LinkRef, Tag, Tag, true, released),
310310
State#{source => Src#{last_nacked_tag => Tag}};
311311
nack(Tag, true, State = #{source := #{current := #{link := LinkRef},
312312
last_nacked_tag := LastTag} = Src}) ->
313313
First = LastTag + 1,
314-
ok = amqp10_client_session:disposition(LinkRef, First, Tag, true, rejected),
314+
ok = amqp10_client_session:disposition(LinkRef, First, Tag, true, released),
315315
State#{source => Src#{last_nacked_tag => Tag}}.
316316

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

0 commit comments

Comments
 (0)