# rabbit-topology

> Simple RabbitMQ topology generator

Latest version **3.0.0** (published 2017-03-11) · 0 weekly downloads

## Install

```sh
npm install rabbit-topology
pnpm add rabbit-topology
yarn add rabbit-topology
bun add rabbit-topology
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2017-03-11 |
| First published | 2017-01-26 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | LeanKit |
| Maintainers | bunk |

## Links

- npm: https://www.npmjs.com/package/rabbit-topology
- Repository: https://github.com/bunk/rabbit-topology
- Homepage: https://github.com/bunk/rabbit-topology#readme
- Issues: https://github.com/bunk/rabbit-topology/issues
- npm.io page: https://npm.io/package/rabbit-topology

## Dependencies (1)

- [lodash](https://npm.io/package/lodash.md) ^4.17.2

## Recent versions

- 3.0.0 (latest) — 2017-03-11
- 2.0.1 — 2017-01-31
- 2.0.0 — 2017-01-26
- 1.0.0 — 2017-01-26

## README

# `rabbit-topology`

[![NPM Version][npm-image]][npm-url]
[![Build][ci-image]][ci-url]
[![Coverage][coverage-image]][coverage-url]

	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

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

### Subscriber

```javascript
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"
```

[npm-image]: https://badge.fury.io/js/rabbit-topology.svg
[npm-url]: https://npmjs.org/package/rabbit-topology
[ci-image]: https://travis-ci.org/Bunk/rabbit-topology.svg?branch=master
[ci-url]: https://travis-ci.org/Bunk/rabbit-topology
[coverage-image]: https://coveralls.io/repos/github/Bunk/rabbit-topology/badge.svg
[coverage-url]: https://coveralls.io/github/Bunk/rabbit-topology

---
_Source: https://npm.io/package/rabbit-topology · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
