✨ Enable Dead-Letter Queue (DLQ) in development configuration and enhance NATS consumer error handling. Update config.dev.toml to enable DLQ routing for failed messages. Modify NATS consumer to append DLQ subject to stream subjects if enabled. Improve error logging in message processing to include message IDs and DLQ routing status, ensuring better observability and error management.
This commit is contained in:
@@ -123,6 +123,6 @@ health_timeout = "2s"
|
||||
[dlq]
|
||||
# Dead-Letter Queue configuration (only applies when mode = "jetstream")
|
||||
# enabled: Enable DLQ routing for poison messages (messages that fail after max_deliver attempts)
|
||||
enabled = false # Set to true when switching to JetStream mode
|
||||
enabled = true # Set to true when switching to JetStream mode
|
||||
# subject: NATS subject where failed messages will be published for manual inspection
|
||||
subject = "caatsm.dlq"
|
||||
|
||||
Reference in New Issue
Block a user