graphql-amqp-connection-manager-subscriptions
Implements the PubSubEngine Interface from the graphql-subscriptions package. It allows you to connect your subscriptions manager to the PubSub mechanism and reuse the existing amqp-connection-manager connection.
This package is influenced by graphql-amqp-subscriptions.
Basic usage
import { AMQPConnectionManagerPubSub } from 'graphql-amqp-connection-manager-subscriptions';
import { connect } from 'amqp-connection-manager';
const connection = connect('amqp://guest:guest@localhost:5672?heartbeat=20');
const pubsub = new AMQPConnectionManagerPubSub({
// Required
connection,
// Optional
exchange: {
name: 'exchange',
type: 'topic',
options: {
durable: false,
autoDelete: true,
},
},
// Optional
queue: {
name: 'queue'
options: {
exclusive: true,
durable: true,
autoDelete: true,
},
},
});
Debug
This package uses Debug.
To show the logs run your app with the environment variable DEBUG="AMQPConnectionManagerPubSub"