question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs clarification needed for concepts-messaging/#retry-letter-topic

See original GitHub issue

I find the Retry letter topic docs confusing. Here are some questions:

  • Is it really the producer’s responsibility to send the message to the retry topic? The docs say “you can configure the producer to send messages to both the business topic and the retry letter topic”. If this is accurate, should the producer send to both topics at the same time or only push to retry topic after business topic fails?
  • In the code example with .retryLetterTopic, does the consumer get both business and retry messages in the same stream? Are retried messages delivered interleaved with business messages based on timestamps, or does the subscription prioritize one topic over the other?
  • What is the relationship between retryLetterTopic and enableRetry? (Is retryLetterTopic ignored when enableRetry is false? Is it an error to specify a retryLetterTopic when enableRetry is false?)
  • What is “retrial queue” (reconsumeLater) ? Is it different than a retry topic?
  • Is reconsumeLater different from throwing an exception that causes the message to go to the retryLetterTopic?
  • What is maxRedeliverCount – is “redeliver” different from “retry”? Is it the number of times it tries to redeliver immediately before putting it in the retry queue, or the number of times it gets put back into the retry queue before going to the dead letter topic?
  • The sentence starting “To configure the delay time” does not actually say how or where to specify a delay time. But I assume it is a global setting on the retry topic?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
alexsappscommented, Oct 25, 2021

I was able to answer most of the questions myself after reading the original PR that introduced the feature - 6449.

Is it really the producer’s responsibility to send the message to the retry topic? …

No. It’s the consumer’s responsibility to call reconsumeLater to effectively move the message to the retry queue upon failing to process a message.

… does the consumer get both business and retry messages in the same stream …

Yes, the consumer implementation automatically subscribes itself to the retry topic as well as the original topic. Still not sure about prioritization or interleaving.

What is the relationship between retryLetterTopic and enableRetry?

enableRetry must be turned on explicitly to enable retries. retryLetterTopic is only used for customizing the retry topic name; if not set a default retry letter topic name is used. Similarly for dead letter topic name.

What is “retrial queue” (reconsumeLater) ? Is it different than a retry topic?

Pretty sure it’s the same. Didn’t see any special “retrial queue” in the code.

Is reconsumeLater different from throwing an exception that causes the message to go to the retryLetterTopic?

Still not sure.

What is maxRedeliverCount – is “redeliver” different from “retry”? …

Redeliver and retry seem to be interchangeable here. It’s the number of times it goes into the retry queue before dead letter topic.

… configure the delay time …

reconsumeLater accepts a delay time that can be different each time it’s called.

2reactions
Huanli-Mengcommented, Sep 23, 2021

@alexsapps thanks for pointing these questions out and I will ping related engineers to see if they can clarify these issues?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Messaging Concepts - Apache Pulsar
This is the documentation for 2.6.0, which is no longer actively maintained. ... This example shows how to consumer messages from a retry...
Read more >
Error Handling via Dead Letter Queue in Apache Kafka
Recognizing and handling errors is essential for any reliable ... Send the message to a dedicated DLQ Kafka topic if any exception occurs....
Read more >
Pulsar: If a message gets nack'd (negativeAcknowledge ...
When will it be redelivered to retry processing? I am unable to figure out what the default setting for delivery is from the...
Read more >
Understanding allow policies | IAM Documentation
To help prevent this issue, Identity and Access Management (IAM) supports concurrency control through ... "message": "There were concurrent policy changes.
Read more >
Amazon SQS dead-letter queues - AWS Documentation
Sometimes, messages can't be processed because of a variety of possible issues, such as erroneous conditions within the producer or consumer application or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found