Skip to content

Latest commit

 

History

History
36 lines (29 loc) · 1009 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 1009 Bytes

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 ) );