I cannot use shovel whith messages having user_id as properties if shovel have different user in dest-uri. This is right following policy rules.
But I cannot override the user_id properties :
rabbitmqctl set_parameter shovel test '{"src-protocol": "amqp091", "src-uri": "amqp://userout:passwordout@fromhost", "src-queue": "testout", "dest-protocol": "amqp091", "dest-uri": "amqp://userin:passwordin@", "dest-queue": "testin", "dest-publish-properties":{"user_id":"userin"} }'
Setting runtime parameter "shovel" for component "test" to "{"src-protocol": "amqp091", "src-uri": "amqp://userout:passwordout@fromhost", "src-queue": "testout", "dest-protocol": "amqp091", "dest-uri": "amqp://userin:passwordin@", "dest-queue": "testin", "dest-publish-properties":{"user_id":"userin"} }" in vhost "/" ...
Error:
{{:case_clause, {:error, {{:badmatch, []}, [{:mirrored_supervisor, :child, 2, [file: 'src/mirrored_supervisor.erl', line: 260]}, {:mnesia_tm, :apply_fun, 3, [file: 'mnesia_tm.erl', line: 836]}, {:mnesia_tm, :execute_transaction, 5, [file: 'mnesia_tm.erl', line: 812]}, {:rabbit_misc, :"-execute_mnesia_transaction/1-fun-0-", 1, [file: 'src/rabbit_misc.erl', line: 542]}, {:worker_pool_worker, :"-run/2-fun-0-", 3, [file: 'src/worker_pool_worker.erl', line: 78]}]}}}, [{:rabbit_shovel_dyn_worker_sup_sup, :start_child, 2, [file: 'src/rabbit_shovel_dyn_worker_sup_sup.erl', line: 45]}, {:rabbit_runtime_parameters, :set_any0, 5, [file: 'src/rabbit_runtime_parameters.erl', line: 164]}, {:rabbit_runtime_parameters, :set_any, 5, [file: 'src/rabbit_runtime_parameters.erl', line: 143]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}
What is wrong ?
rabbitmqctl list_parameters
Listing runtime parameters for vhost "/" ...
component name value
shovel test {"dest-protocol":"amqp091","dest-publish-properties":{"user_id":"userin"},"dest-queue":"testin","dest-uri":"amqp://userin:passwordin@","src-protocol":"amqp091","src-queue":"testout","src-uri":"amqp://userout:passwordout@fromhost"}
rabbitmqctl clear_parameter shovel test
Clearing runtime parameter "test" for component "shovel" on vhost "/" ...
Error:
{{:badmatch, {:error, :not_found}}, [{:rabbit_shovel_dyn_worker_sup_sup, :stop_child, 1, [file: 'src/rabbit_shovel_dyn_worker_sup_sup.erl', line: 61]}, {:rpc, :"-handle_call_call/6-fun-0-", 5, [file: 'rpc.erl', line: 197]}]}
rabbitmqctl list_parameters
Listing runtime parameters for vhost "/" ...
component name value
for me it's a very strange
behaviorrabbitmq 3.7.9 Erlang 21.1
Thanks in advance
Paolo Patruno