Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/herrmannplatz/rabbitly
configuration based ampq message handling
https://github.com/herrmannplatz/rabbitly
ampq nodejs rabbitmq yaml
Last synced: 14 days ago
JSON representation
configuration based ampq message handling
- Host: GitHub
- URL: https://github.com/herrmannplatz/rabbitly
- Owner: herrmannplatz
- Created: 2022-09-11T06:57:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-09-13T18:40:59.000Z (over 2 years ago)
- Last Synced: 2024-11-11T16:37:50.217Z (2 months ago)
- Topics: ampq, nodejs, rabbitmq, yaml
- Language: TypeScript
- Homepage:
- Size: 33.2 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rabbitly π π°π¨
> configuration based ampq message handling
βοΈStill in development
## Install
`npm install herrmannplatz/rabbitly`
## Usage
Place a `rabbitly.yaml` in the root of you project.
```yaml
version: 1host: amqp://localhost
exchange:
name: logs
queues:
errors:
routingKey: logs.error
handler: handler.errors
json: true
```If you prefer editor support when writing your configuration, reference the schema in your configuration file and install [YAML vscode extension](https://marketplace.visualstudio.com/items?itemName=redhat.vscode-yaml)
```yaml
# yaml-language-server: $schema=node_modules/rabbitly/schema.json
version: 1host: ${RABBITMQ_URI}
exchange:
name: logs
```Specify the handler file `handler.js` with exports the specified handler functions.
```js
module.exports.errors = async (message) => {
console.error('π₯', message)
}
```Run it.
```json
{
"scripts": {
"start": "rabbitly"
}
}
```