Closed michaelklishin closed 4 years ago
This is how parameters in the problematic case are deserialised:
"parameters" => [
%{
"component" => "federation-upstream",
"name" => "up-1",
"value" => [
["ack-mode", "on-confirm"],
["trust-user-id", false],
["uri", "amqp://127.0.0.1:5672"]
],
"vhost" => "/"
},
%{
"component" => "shovel",
"name" => "shovel-60",
"value" => [
["ack-mode", "on-confirm"],
["dest-add-forward-headers", false],
["dest-protocol", "amqp091"],
["dest-queue", "shovel-60-dst"],
["dest-uri", "amqp://localhost:5672"],
["src-delete-after", "never"],
["src-protocol", "amqp091"],
["src-queue", "shovel-60-src"],
["src-uri", "amqp://localhost:5672"]
],
"vhost" => "/"
}
]
JSON file difference makes it clear it's an export_definitions
issue:
"parameters": [
{
"component": "federation-upstream",
"name": "up-1",
"value": [
[
"ack-mode",
"on-confirm"
],
[
"trust-user-id",
false
],
[
"uri",
"amqp://127.0.0.1:5672"
]
],
"vhost": "/"
},
{
"component": "shovel",
"name": "shovel-60",
"value": [
[
"ack-mode",
"on-confirm"
],
[
"dest-add-forward-headers",
false
],
[
"dest-protocol",
"amqp091"
],
[
"dest-queue",
"shovel-60-dst"
],
[
"dest-uri",
"amqp://localhost:5672"
],
[
"src-delete-after",
"never"
],
[
"src-protocol",
"amqp091"
],
[
"src-queue",
"shovel-60-src"
],
[
"src-uri",
"amqp://localhost:5672"
]
],
"vhost": "/"
}
],
vs. HTTP API-produced one:
"parameters": [
{
"value": {
"ack-mode": "on-confirm",
"trust-user-id": false,
"uri": "amqp://127.0.0.1:5672"
},
"vhost": "/",
"component": "federation-upstream",
"name": "up-1"
},
{
"value": {
"ack-mode": "on-confirm",
"dest-add-forward-headers": false,
"dest-protocol": "amqp091",
"dest-queue": "shovel-60-dst",
"dest-uri": "amqp://localhost:5672",
"src-delete-after": "never",
"src-protocol": "amqp091",
"src-queue": "shovel-60-src",
"src-uri": "amqp://localhost:5672"
},
"vhost": "/",
"component": "shovel",
"name": "shovel-60"
}
],
"Incorrectly" here means it uses keyword lists instead of maps:
This issue is not present with a file produced by the HTTP API.
Discovered while working on https://github.com/rabbitmq/rabbitmq-server/issues/2384.
Apparently it was introduced by this change https://github.com/rabbitmq/rabbitmq-server/commit/460a432 that makes exported parameter values to be proplists and not maps.