feat: expose terminal consumer failure hook
Allow consumers to react once after all processing retries are exhausted while preserving the base acknowledgement policy. Ref: IT-1033
This commit is contained in:
@@ -25,3 +25,10 @@ ownership of acknowledgements and retries.
|
||||
Override `TryValidateMessage(...)` for application-specific permanent validation.
|
||||
Returning `false` nacks the delivery without requeue before retry processing begins.
|
||||
Keep validation errors free of credentials and sensitive payload values.
|
||||
|
||||
Override `HandleMessageRetriesExhaustedAsync(...)` when a consumer must react once to a
|
||||
terminal processing failure, for example by publishing a neutral failure result to the
|
||||
requesting client. The hook runs after the final handler exception and before the original
|
||||
delivery is nacked without requeue. Hook failures are logged and do not replace the
|
||||
original failure or acknowledgement policy. Application shutdown cancellation does not
|
||||
invoke the hook.
|
||||
|
||||
Reference in New Issue
Block a user