3.0.0 • Published 6 years ago

amqplib-topology v3.0.0

Weekly downloads
51
License
-
Repository
github
Last release
6 years ago

amqplib-topology

NPM Version Build Coverage

Asserts a Rabbit MQ topology using the amqp.node library.

Usage:

const amqp = require( "amqplib" );
const amqpTopology = require( "amqplib-topology" );

let ok = amqp.connect( rabbitUri );

ok = ok
	.then( connection => {
		return amqpTopology( connection ).assert( {
			exchanges: {
				"events": {
					"type": "fanout"
				}
			}
		} );
	} )
	.then( topology => console.log( "Topology created!", topology.exchanges.events ) )
	.catch( err => console.error( err ) );