Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brendanhay/digger
CLI tool to generate publish-one, subscribe-many Shovel configurations for RabbitMQ
https://github.com/brendanhay/digger
Last synced: about 1 month ago
JSON representation
CLI tool to generate publish-one, subscribe-many Shovel configurations for RabbitMQ
- Host: GitHub
- URL: https://github.com/brendanhay/digger
- Owner: brendanhay
- License: mpl-2.0
- Created: 2012-03-29T05:21:35.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-03-31T12:36:10.000Z (over 12 years ago)
- Last Synced: 2024-10-13T23:48:17.809Z (2 months ago)
- Language: Erlang
- Homepage:
- Size: 2.21 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Digger
===[![Build Status](https://secure.travis-ci.org/brendanhay/digger.png)](http://travis-ci.org/brendanhay/digger)
Introduction
------------Digger is a quick and dirty command-line tool to generate a RabbitMQ Shovel configuration entry for a `publish-one/subscribe-many` model.
**Input**
````erlang
[
%% This proplist constitutes many-sources containing the
%% same exchange and a single-destination
[{sources, [
"amqp://guest:guest@hostfoo",
"amqp://guest:guest@hostbar"
]},
{destination, "amqp://guest:[email protected]"},
{exchange, [
{name, "exchangename"},
{type, <<"direct">>},
durable
]},
{routing_keys, [
"Track",
"Tag"
]}]
].
````**Output**
````erlang
{rabbitmq_shovel, [
{shovels, [
{exchangename.hostfoo, [
{sources, [
{broker, "amqp://guest:guest@hostfoo"},
{declarations, [
{'exchange.declare',[{exchange,<<"exchangename">>},{type,<<"direct">>},durable]},
{'queue.declare',[{queue,<<"exchangename.hostfoo.shovel">>},durable]},
{'queue.bind',[{exchange,<<"exchangename">>},{queue,<<"exchangename.hostfoo.shovel">>},{routing_key,<<"Track">>}]},
{'queue.bind',[{exchange,<<"exchangename">>},{queue,<<"exchangename.hostfoo.shovel">>},{routing_key,<<"Tag">>}]}
]}
]},
{destinations, [
{broker, "amqp://guest:[email protected]"},
{declarations, [
{'exchange.declare',[{exchange,<<"exchangename">>},{type,<<"direct">>},durable]}
]}
]},
{queue, <<"exchangename.hostfoo.shovel">>},
{prefetch_count, 1000},
{ack_mode, on_confirm},
{publish_properties, []},
{publish_fields, [{publish_fields,[{exchange,<<"exchangename">>}]}]},
{reconnect_delay, 10}
]},{exchangename.hostbar, [
{sources, [
{broker, "amqp://guest:guest@hostbar"},
{declarations, [
{'exchange.declare',[{exchange,<<"exchangename">>},{type,<<"direct">>},durable]},
{'queue.declare',[{queue,<<"exchangename.hostbar.shovel">>},durable]},
{'queue.bind',[{exchange,<<"exchangename">>},{queue,<<"exchangename.hostbar.shovel">>},{routing_key,<<"Track">>}]},
{'queue.bind',[{exchange,<<"exchangename">>},{queue,<<"exchangename.hostbar.shovel">>},{routing_key,<<"Tag">>}]}
]}
]},
{destinations, [
{broker, "amqp://guest:[email protected]"},
{declarations, [
{'exchange.declare',[{exchange,<<"exchangename">>},{type,<<"direct">>},durable]}
]}
]},
{queue, <<"exchangename.hostbar.shovel">>},
{prefetch_count, 1000},
{ack_mode, on_confirm},
{publish_properties, []},
{publish_fields, [{publish_fields,[{exchange,<<"exchangename">>}]}]},
{reconnect_delay, 10}
]}
]}
]}
````Contribute
----------For any problems, comments or feedback please create an issue [here on GitHub](github.com/brendanhay/digger/issues).
Licence
-------Digger is released under the [Mozilla Public License Version 2.0](http://www.mozilla.org/MPL/)