Commit 5f0afd1
Some AMQP 0.9.1 headers, in particular x-death headers, cannot be set as
application properties. Before this change, trying to shovel
dead-lettered messages from an AMQP 0.9.1 source to AMQP 1.0 destination
would fail with:
```
reason: {badarg,
[{unicode,characters_to_binary,
[[{table,
[{<<"count">>,long,1},
{<<"reason">>,longstr,<<"maxlen">>},
{<<"queue">>,longstr,<<"tmp">>},
{<<"time">>,timestamp,1745575728},
{<<"exchange">>,longstr,<<>>},
{<<"routing-keys">>,array,
[{longstr,<<"tmp">>}]}]}]],
[{file,"unicode.erl"},
{line,1219},
{error_info,#{module => erl_stdlib_errors}}]},
{amqp10_client_types,utf8,1,
[{file,"amqp10_client_types.erl"},{line,99}]},
{amqp10_msg,'-set_application_properties/2-fun-0-',3,
[{file,"amqp10_msg.erl"},{line,385}]},
{maps,fold_1,4,[{file,"maps.erl"},{line,860}]},
{amqp10_msg,set_application_properties,2,
[{file,"amqp10_msg.erl"},{line,384}]},
{maps,fold_1,4,[{file,"maps.erl"},{line,860}]},
{rabbit_amqp10_shovel,forward,4,
[{file,"rabbit_amqp10_shovel.erl"},{line,337}]},
{rabbit_shovel_worker,handle_info,2,
[{file,"rabbit_shovel_worker.erl"},{line,104}]}]}
```
(cherry picked from commit c5271ea)
(cherry picked from commit 0ce72b4)1 parent af6a224 commit 5f0afd1
File tree
3 files changed
+26
-4
lines changed- deps/rabbitmq_shovel
- src
- test
3 files changed
+26
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
450 | 448 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
99 | 123 | | |
100 | 124 | | |
101 | 125 | | |
| |||
0 commit comments