An open API service indexing awesome lists of open source software.

https://github.com/codex-team/hawk.registry

Registry for handling workers
https://github.com/codex-team/hawk.registry

Last synced: 4 months ago
JSON representation

Registry for handling workers

Awesome Lists containing this project

README

          

# Hawk registry

Registry is based on RabbitMQ for messaging protocol

## Hawk specifics

We have **durable exchange** `errors` from where each individual queues gets messages. e.g. nodejs errors goes to `errors/nodejs` queue via the same-named routing key

For handling invalid messages we have dead-letter exchange `stash`. `stash` policy is defined which is applicable to all queues matching `errors/*`. It sets dead-letter exchange to `stash`.

> Remember to create `stash/` queues similarly to `errors/` and make binds in `stash` exchange:
>
> ```
> Destination: `stash/`
> Routing key: `errors/`
> ```

| Queue | Description |
| ----------------------- | -------------------------------------------------- |
| `errors/` | Queues for errors |
| `stash/` | Queues for invalid errors |
| `log` | Queue for logging worker (notify to telegram, etc) |

| Exchange | Description |
| -------- | --------------------------------------------------------------------------------------- |
| `errors` | Main exchange for errors, routes to `errors/` via same-named routing key |
| `stash` | Dead-letter exchange for invalid errors of `errors/*` queues |

## Getting started

## Docker way

`docker-compose up` or `bin/docker_start.sh` if you don't have docker-compose

## Without docker

- Install RabbitMQ
- Enable management plugin (`rabbitmq-plugins enable rabbitmq_management`)
- Edit your configuration file (default in Linux `/etc/rabbitmq/rabbitmq.conf`)

```
management.load_definitions = /path/to/definitions/rabbit.definitions.json
```

OR

Import once using `rabbitmqadmin`

```bash
rabbitmqadmin -q import config/rabbit.definitions.json
```