[rabbitmq-discuss] Basic help with Shovel

Jason J. W. Williams jasonjwwilliams at gmail.com
Wed Apr 20 18:17:13 BST 2011


Hi Ristretto,


> [{rabbit_shovel,
>  [{shovels,
>    [{outgoing,
>      [{sources,  [{brokers,
>                          ["amqp://"]}
>                       ]},
>       {destinations, [{broker, "amqp://tortuga/"}
>                       ]},
>       {queue, <<"outgoing">>},
>       {prefetch_count, 1},
>       {auto_ack, false},
>       {tx_size, 0},
>       {publish_properties, [{delivery_mode, 2}]},
>       {publish_fields, [{exchange, <<"test_exchange">>},
>                        {routing_key, <<"from_shovel">>}]},
>      {reconnect_delay, 5}
>      ]}
>     ]
>   }]
> }].
>

The exchanges and queues already need to be declared...you might also
need to put your username and password in those URLs. Just finished
writing the chapter on Shovel for the RabbitMQ in Action book...so
we've got a working Shovel config you can look at:

https://github.com/rabbitinaction/sourcecode/blob/master/configs/rabbitmq/rabbitmq.config.shovel

It declares an exchange called incoming_orders and a queue called
backup_orders, an binds them with the routing key warehouse.

-J


More information about the rabbitmq-discuss mailing list