You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Sathyanath Nagaraja (Jira)" <ji...@apache.org> on 2026/03/04 10:23:00 UTC

[jira] [Created] (QPIDJMS-621) Make MODIFIED_FAILED_UNDELIVERABLE behavior configurable during message delivery transformation errors

Sathyanath Nagaraja created QPIDJMS-621:
-------------------------------------------

             Summary: Make MODIFIED_FAILED_UNDELIVERABLE behavior configurable during message delivery transformation errors
                 Key: QPIDJMS-621
                 URL: https://issues.apache.org/jira/browse/QPIDJMS-621
             Project: Qpid JMS
          Issue Type: Improvement
          Components: qpid-jms-client
    Affects Versions: 0.59.0
            Reporter: Sathyanath Nagaraja


### Current Behavior
During `processDelivery()` in `AmqpConsumer.java` (line 559), when an error occurs during message transformation, the consumer always sends a `MODIFIED_FAILED_UNDELIVERABLE` disposition to the broker.

### Problem
This behavior is problematic because:
- **Transient transformation errors** can occur temporarily (e.g., due to unavailable resources, temporary encoding issues)
- When `MODIFIED_FAILED_UNDELIVERABLE` is sent to Azure Service Bus (ASB), messages are placed in the **dead-letter queue or deferred state**
- This causes valid messages to be unnecessarily lost or deferred, even when the error may be transient and recoverable
- Applications cannot differentiate between permanent failures and transient failures during transformation

### Desired Behavior
This behavior should be made **configurable**, allowing users to:
- Specify different delivery failure dispositions (e.g., `RELEASED`, `REJECTED`, or `MODIFIED_FAILED_UNDELIVERABLE`)
- Choose to retry on transient transformation errors instead of immediately marking messages as undeliverable
- Prevent transient errors from causing permanent message loss

### Affected Code
- **File**: `qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java`
- **Method**: `processDelivery()`
- **Line**: ~559

### Suggested Implementation
Add a configuration property to allow customization of the delivery disposition for transformation errors:
- `amqp.transformationErrorDisposition` - to specify the disposition (default: `MODIFIED_FAILED_UNDELIVERABLE` for backward compatibility)
- Alternatively, add `amqp.retryOnTransientTransformationError` to enable retry behavior for transient failures

### Impact
- **Without this change**: Transient transformation errors cause messages to be permanently deferred/dead-lettered in ASB
- **With this change**: Applications can handle transient errors more gracefully and prevent message loss

### Related Links
- Code reference: https://github.com/apache/qpid-jms/blob/main/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpConsumer.java#L559



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org