https://github.com/mvillarrealb/sequelize-event-stream
Event publishing capabilities for your sequelize's models using hooks
https://github.com/mvillarrealb/sequelize-event-stream
aws-sqs event-driven kafka orm rabbitmq sequelize
Last synced: about 1 month ago
JSON representation
Event publishing capabilities for your sequelize's models using hooks
- Host: GitHub
- URL: https://github.com/mvillarrealb/sequelize-event-stream
- Owner: mvillarrealb
- License: mit
- Created: 2018-11-03T04:21:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-05T02:56:41.000Z (over 6 years ago)
- Last Synced: 2025-01-12T14:47:40.109Z (6 months ago)
- Topics: aws-sqs, event-driven, kafka, orm, rabbitmq, sequelize
- Language: JavaScript
- Size: 332 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sequelize-event-stream
## *WORK IN PROGRESS :D*
[](https://www.npmjs.com/package/sequelize-event-stream)
[](https://travis-ci.org/mvillarrealb/sequelize-event-stream)
[](https://codecov.io/gh/mvillarrealb/sequelize-event-stream)

[](https://github.com/mvillarrealb/sequelize-event-stream/blob/master/LICENSE)Event publishing capabilities for your sequelize's models using hooks.
**sequelize-event-stream** adds a sugaring layer to your database connection, listening for every transactional event in sequelize.

The architecture works as follows:
The sequelize event stream is attached to your sequelize's instance, it will listen for every supported hook. Supported hooks are:
* afterCreate
* afterUpdate
* afterDestroy
* afterBulkCreate
* afterBulkUpdate
* afterBulkDestroyOnce fired one of the listed hooks it will use a eventWorker configuration to send your message as an event to a queue/topic from the supported brokers.
# Supported Sinks
* Rabbitmq
* Kafka
* Amazon SQS# Installation
```bash
npm install --save sequelize-event-stream
```# Documentation
You can check the full [documentation](https://mvillarrealb.github.io/sequelize-event-stream/) to view full usage of this module.
## Run all tests
To run all unit and integration tests:
```bash
npm test
```## Run unit tests only
To run the unit tests use the following command:
```bash
npm run unit-test
```## Run integ tests only
To run the integration tests use the following command:
```bash
npm run integ-test
```# Generate ESDOC Documentation
To geneate the ESDOC documentation use the following command:
```bash
npm run docs
```# Running the coverage
To run the coverage report use the following command
```bash
npm run coverage
```