Sequelize Rabbit
A simple sequelize plugin that sends pushes notifications to your amqp queue whenever is action on your database.
Usage
const sequelizeRabbit = const sequelize = ...
Options
connection
specifying your rabbit mq connection string defaulting to
process.env.AMQP_CREDENTIALS
channel
specifies which exchange to push messages too defaults to 'main'
Notes
The routing key will be sequelize.resource_name.action.id
by default an empty
message will be sent. You can override this on your models by adding a rabbit
field to the sequelize constructor. Using the sendData
field will send the
objects dataValues.
const User = sequelize Userrabbit = sendData: true excludeFields: 'password' 'salt'