-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Switch from Jackrabbit to Rabbot #10
Conversation
@@ -6,6 +6,8 @@ machine: | |||
pre: | |||
# Stop rabbitmq that comes with circle by default. | |||
- sudo service rabbitmq-server stop | |||
environment: | |||
DEBUG: loopback:componenet:mq,rabbot* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Type: componenet
|
||
This component provides a convenient way to work with a RabbitMQ within a loopback application. This includes: | ||
|
||
- Defining a RabbitMQ topology using the componenet-config.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: componenet
|
||
// Wait the app to be booted | ||
app.once('booted', () => { | ||
debug('initializing message queue componenet with settings: %o', settings) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: componenet
Inside this queue definition you can define a `consumer`, a `producer`, or both. The `consumer` and `producer` objects | ||
both accept 2 properties, `model` and `method`. | ||
```bash | ||
DEBUG=loopback:componenet:mq npm run dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: componenet
|
||
- Add support for more types of Queues in the topology | ||
```bash | ||
DEBUG=loopback:componenet:mq npm test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: componenet
const loopback = require('loopback') | ||
const url = require('url') | ||
const rabbit = require('rabbot') | ||
const queueDef = require('./models/rabbitmq.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think modelDef
makes more sense here as it's not the definition of a queue but a model.
"name": "RabbitMQ", | ||
"plural": "RabbitMQ", | ||
"base": "Model", | ||
"description": "Provide access to data about the queues and the rabbitmq server." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Installation | ||
# Overview | ||
|
||
This component provides a convenient way to work with a RabbitMQ within a loopback application. This includes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with a RabbitMQ
=> with RabbitMQ
or with a RabbitMQ server
- Defining a RabbitMQ topology using the componenet-config.json | ||
- Registering message producers and consumers handlers using a mixin. | ||
- Inspecting RabbitMQ stats and queue statuses using a RabbitMQ loopback model. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should mention why this package provides both a component and a mixin. Just one or two lines that explains the design choice for having both.
BREAKING CHANGE: Switch from Jackrabbit to Rabbot
BREAKING CHANGE: Switch from Jackrabbit to Rabbot