Skip to content

Instantly share code, notes, and snippets.

@nikolayvitaev
Created September 26, 2018 14:24
Show Gist options
  • Save nikolayvitaev/5d843a7e6f7ed7c6aaa9b835d9ef723d to your computer and use it in GitHub Desktop.
Save nikolayvitaev/5d843a7e6f7ed7c6aaa9b835d9ef723d to your computer and use it in GitHub Desktop.
{rabbit_shovel, [
{shovels, [
{my_first_shovel, [
{sources, [
{brokers, ["amqp://user:pwd@host1/vhost"]},
{declarations, [
{'exchange.declare', [{exchange, <<"source_exchange">>}, {type, <<"direct">>}, durable]}
{'queue.declare', [{queue, <<"source_queue">>}, durable]},
{'queue.bind', [{exchange, <<"source_exchange">>}, {queue, <<"source_queue">>}]}
]}
]},
{destinations, [
{broker, "amqp://user:pwd@host2/vhost"},
{declarations, [
{'exchange.declare', [{exchange, <<"destination_exchange">>}, {type, <<"direct">>}, durable]}
{'queue.declare', [{queue, <<"destination_queue">>}, durable]},
{'queue.bind', [{exchange, <<"desintation_exchange">>}, {queue, <<"destination_queue">>}]}
]}
]}
]},
{queue, <<"source_queue">>},
{publish_fields, [
{exchange, <<"destination_exchange">>}
]}
]}
]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment