Skip to content

Conversation

@dewidyabagus
Copy link

@dewidyabagus dewidyabagus commented Dec 13, 2025

Pull Request type

  • Feature

Changes in this PR

Enhanced AMQPSettings to support additional RabbitMQ queue arguments through URI parameters.

New URI Parameters:

  • deadLetterExchange: Configure x-dead-letter-exchange
  • deadLetterRoutingKey: Configure x-dead-letter-routing-key
  • messageTtl: Configure x-message-ttl (milliseconds)
  • maxLength: Configure x-max-length

Example usage:

amqp_queue:myQueue?deadLetterExchange=myDLX&deadLetterRoutingKey=failed&messageTtl=60000

Problem

When workflows are triggered via Event Handlers sourced from RabbitMQ, and the workflow initiation fails due to backend database issues, the incoming message is nacked using basic.nack with requeue=false. As a result, the message is not requeued to the original queue and is expected to be routed to a Dead Letter Exchange (DLX). However, since the DLX configuration is currently not in place, the message is ultimately discarded.

Solution

By introducing new parameters for Dead Letter Exchange (DLX) configuration that enable queues to use DLX settings, along with additional arguments for message expiration (TTL) and maximum queue length, all of which are optional.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants