This service is designed to handle RabbitMQ Dead Letter Queue messages. The idea behind this service is to attempt to
re-process messages sent to the DLQ number of times (default 5, but could be configured using
rabbitmq.failureThreshold parameter). Each time DLQ Handler attempts to send the message back to the original exchange,
it will delay resending. The time delay is calculated using two parameters (both in seconds):
rabbitmq.initialDelayrabbitmq.multiplierService uses the following formula:
delay = initialDelay + (initialDelay * multiplier * (attempt - 1))
The attempt in this case is the index of the current attempt to re-send message back to original exchange.
Service supports two types of configuration:
Environment variables taking precedence over configuration in case of both are used.
The configuration file is hierarchical and can be either in YAML or JSON format. Application searches for the job.yaml
or job.json files in two locations:
The following table describes the configuration parameters, with . delimiting levels of hierarchy.
I.e. property name rabbitmq.username will be translated into either "rabbitmq": {"username": "value"} in JSON or
the following structure in YAML:
rabbitmq:
username: value
| Property Name | Environment Variable | Default Value | Description |
|---|---|---|---|
| debug | DEBUG | false | Enable debug logging |
| rabbitmq.url | RABBITMQ_URL | n/a | RabbitMQ URL |
| rabbitmq.username | RABBITMQ_USERNAME | n/a | RabbitMQ username |
| rabbitmq.password | RABBITMQ_PASSWORD | n/a | RabbitMQ user password |
| rabbitmq.orphanExchange | ORPHAN_EXCHANGE | n/a | Name of the orphan exchage. If omitted DLQ Handler won't try to use it as anlternate exchange for DLX |
| rabbitmq.dlx | DLX | dlx | Dead Letter Exchange Name |
| rabbitmq.dlxType | DLX_TYPE | direct | Type of Dead Letter Exchange |
| rabbitmq.dlq | DLQ | dlq | Dead Letter Queue Name |
| rabbitmq.dlqRoutingKeys | DLQ_ROUTING_KEYS | n/a | A comma separated list of the routing keys to bind the DLQ with |
| rabbitmq.parkingLot | PARKING_LOT | parking-lot | Parking lot queue name |
| rabbitmq.parkingLotRoutingKey | PARKING_LOT_ROUTING_KEY | park | Parking lot queue routing key |
| rabbitmq.initialDelay | INITIAL_DELAY | n/a | Initial delay in second which DLQ Handler will use before attempting to send mssage back to the original exchange |
| rabbitmq.multiplier | MULTIPLIER | 10 (seconds) | A maltiplier to use increasy initial delay by with every subsequent attempt |
| rabbitmq.failureThreshold | FAILURE_THRESHOLD | 5 | How many time DLQ Handler will attempt to re-process failed message |
Content type
Image
Digest
sha256:2117af10c…
Size
3.3 MB
Last updated
11 days ago
docker pull iktech/dlq-handler-service