Issue with JetStream DLQ Functionality and Message Removal #630
Unanswered
Atanusaha143
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
I am implementing Dead Letter Queue (DLQ) functionality with JetStream and encountered an issue regarding message persistence in the stream after maximum retry attempts. Below is the setup and the observed behavior.
Streams Report
Stream Configuration:
Consumer Configuration:
Now, let's imagine a scenario where I try to publish a message by executing the following line:
And I have the below subscriber to listen on:
When a
ZeroDivisionError
occurs, the consumertest_pull_con
retries processing the message up toMaximum Deliveries: 5
times. SinceAcknowledgements
are enabled in the stream configuration, the message remains in the stream until acknowledged, and a copy of the message is sent totest_pull_dlq_stream
. Implemented with "Dead Letter Queues" type functionalityObserved Behavior:
The message continues to exist in the stream after the retries are exhausted. Since Maximum Deliveries have been reached, the message is no longer processed but still remains in the
test_pull_stream
. And as intendedtest_pull_dlq_stream
gets a copy of it.Question:
How can I remove the message from the
test_pull_stream
once Maximum Deliveries is exhausted, as it has no further retries left and I already have it ontest_pull_dlq_stream
without any manual action?NOTE
It is mentioned on "Dead Letter Queues" type functionality that If a message reaches its maximum level of delivery attempts, it will still stay in the stream until it is manually deleted or manually acknowledged.
Beta Was this translation helpful? Give feedback.
All reactions