rabbit-nodeworker/README.md

27 lines
979 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Rabbit NodeJS Worker
Consumes CRUD messages from RabbitMQ and writes to Postgres.
Комментарий: воркер специально пишет в таблицу демо и не хранит собственное состояние, кроме метрик в памяти.
## Environment variables
RabbitMQ:
- `AMQP_URL` (preferred), example: `amqp://user:pass@host:5672/vhost`
- or `RABBIT_HOST`, `RABBIT_PORT` (default 5672), `RABBIT_USER`, `RABBIT_PASSWORD`, `RABBIT_VHOST` (default `/`)
- `RABBIT_QUEUES` (default `crud_queue`)
- `RABBIT_DURABLE` (default `true`)
- `RABBIT_PREFETCH` (default `1`)
- `REQUEUE_ON_ERROR` (default `true`)
Postgres:
- `DATABASE_URL` (optional)
- or `PGHOST`, `PGPORT` (default 5432), `PGUSER`, `PGPASSWORD`, `PGDATABASE` (default `postgres`), `PGSSLMODE` (default `require`)
- `PG_TABLE` (default `rabbit_messages`)
## Notes
Health endpoint: `/healthz`.
HTML-страница со статусом доступна на `/`.