A deepstream.io message connector for amqp This connector uses the npm amqp package. Please have a look there for detailed options.
The "Advanced Message Queueing Protocol" is implemented by a large number of brokers, e.g. RabbitMQ, Qpid, HornetQ or ActiveMQ to name just a few. AMQP supports powerful routing patterns and achieves high reliability through features such as persistent queues or guaranteed message delivery.
AMQP is reliable and widely adopted. It also comes fully managed as part of cloud hosting offerings like Azure's Service Bus.
deepstream doesn't actually use the advanced messaging and routing patterns that AMQP offers. Instead, it sets up a single topic-exchange
for name based routing and binds a queue per topic and client to it to create a publish/subscribe workflow.
Equally, deepstream doesn't necessarily require the advanced persistence and guaranteed message delivery features that AMQP offers - data is stored within the storage layer and messaging is only used to propagate updates - meaning that subsequent messages will reconcile a corrupted state.
deepstream offers an official plugin to connect to AMQP-clusters. It can be installed via deepstream's Command Line Interface using the msg
keyword, e.g.
deepstream install msg amqp
If you're using deepstream in Node, you can also install it via NPM
You can configure the amqp connector in the plugins
section of deepstream's config.yml file (by default either in the conf
directory or in /etc/deepstream
on Linux)
##Basic Setup
plugins:
message:
name: amqp
options:
host: ${AMQP_HOST}
port: ${AMQP_PORT}
var Deepstream = require( 'deepstream.io' ),
AMQPConnector = require( 'deepstream.io-msg-amqp' ),
server = new Deepstream();
server.set( 'messageConnector', new AMQPConnector( {
port: 5672,
host: 'localhost'
}));
server.start();