3.0.0 • Published 7 years ago

rabbit-topology v3.0.0

Weekly downloads
54
License
-
Repository
github
Last release
7 years ago

rabbit-topology

NPM Version Build Coverage

Initial release designed to generate a topology definition.
Other libraries are used to assert the topology against a running server.

Produce a rabbit topology definition from a DSL.

Domain-Specific Language

TODO: Formally define the DSL

Examples

Publisher

const definition = {
	exchanges: {
		"app.events": {
			type: "fanout",
			exchanges: {
				"app.events.topic": {
					type: "topic"
				}
			}
		}
	}
}

Subscriber

const definition = {
	exchanges: {
		"app.service": {
			type: "fanout",
			queues: {
				inbound: {
					name: "app.service.queue",
					durable: true,
					prefetch: 50,
					deadLetterExchange: {
						name: "app.service.dlx",
						type: "fanout",
						queues: {
							"ingress.dlq": { durable: true }
						}
					}
				}
			},
			subscriptions: {
				"app.events.topic": {
					type: "topic",
					patterns: [ "app.#" ]
				}
			}
		}
	}
};
const topology = parser.parse( definition );
console.log( topology.queues.inbound );  // "app.service.queue"
3.0.0

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.0

7 years ago