Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@brendanhay
Created May 18, 2012 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendanhay/2723964 to your computer and use it in GitHub Desktop.
Save brendanhay/2723964 to your computer and use it in GitHub Desktop.
Shovel Example
{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