I failed to convert a dynamic shovel to a static one in the RabbitMQ config file.
I followed the example from the official guide at https://www.rabbitmq.com/shovel-static.html. I changed my advanced.config
file at Windows default's path C:\Users\admin\AppData\Roaming\RabbitMQ
like the one is shown below.
But either I get a syntax error or the shovel does not properly run.
My dynamic shovel looks like this.
and my attempt to convert it into static is this.
{rabbitmq_shovel,
[ {shovels, [
{from_local_to_cloud, [
{source, [
{protocol, amqp091},
{uris, ["amqp://"]},
{declarations, [
]},
{queue, <<"local_to_cloud">>}
]},
{destination, [
{protocol, amqp091},
{uris, ["amqp://dzjkevdt:<password>@sparrow.rmq.cloudamqp.com/dzjkevdt"]},
{declarations, [
]},
{queue, <<"local_to_cloud">>}
]}
]
}
]}
]},
Running the above configuration I get state terminated
.
So, how do I create the static shovel like the dynamic I created in the attached image?
I answer my question.
I had to manually create the queue first. I thought it would be created automatically but this was not true.
The advanced.config
for shovel's plugin looks like this.
{from_local_to_cloud,
[
{source, [
{protocol, amqp091},
{uris, ["amqp://"]},
{declarations, []},
{queue, <<"local_to_cloud">>}
]},
{destination, [
{protocol, amqp091},
{uris, ["amqp://dzjkevdt:<password>@sparrow.rmq.cloudamqp.com/dzjkevdt"]},
{declarations, []},
{queue, <<"local_to_cloud">>}
]}
]
}