Skip to content

Commit

Permalink
Remove delivery_mode header from amqp 1.0 shovel.
Browse files Browse the repository at this point in the history
This header is not present if delivery_mode = 2, it does not really
makes sense to leave it when delivery_mode = 1.
The durability of the message is reflected in the durable flag of the
amqp 1.0 message.
  • Loading branch information
luos committed Feb 6, 2024
1 parent 627576d commit 066fb59
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deps/rabbitmq_shovel/src/rabbit_amqp10_shovel.erl
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ set_message_properties(Props, Msg) ->
#{content_encoding => to_binary(Ct)}, M);
(delivery_mode, 2, M) ->
amqp10_msg:set_headers(#{durable => true}, M);
(delivery_mode, 1, M) ->
M;
(priority, P, M) when is_integer(P) ->
amqp10_msg:set_headers(#{priority => P}, M);
(correlation_id, Ct, M) ->
Expand Down

0 comments on commit 066fb59

Please sign in to comment.