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.
TODO: Formally define the DSL
const definition = {
exchanges: {
"app.events": {
type: "fanout",
exchanges: {
"app.events.topic": {
type: "topic"
}
}
}
}
}
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"