Quantcast
Channel: Active questions tagged consumer - Stack Overflow
Viewing all articles
Browse latest Browse all 87

How work RetryTopic with other groupId and backOff properties

$
0
0

I'm using spring-kafka and @RetryTopic and I can't understand how this works

  1. for different groupId-s :

    For example, the topic TestTopic contains 5 messages and islistened to by 2 consumers - groupId_1 and groupId_2

    groupId_1 did not process message #2 and sent it to TestTopic_1

    groupId_2 did not process message #4 and sent it to TestTopic_1

    When groupId_1 and groupId_2 read messages fromTestTopic_1, it turns out that groupId_1 subtracts both messages #2 and #4 (is it obtained again?) And groupId_1subtracts message #2 (is it repeated?) and #4 How it works? How toavoid re-processing?

  2. And a question about setting up work @RetryTopic aboutbackoff, for example I have a setting

    @RetryableTopic(         attempts = "3",         topicSuffixingStrategy = TopicSuffixingStrategy.SUFFIX_WITH_INDEX_VALUE,         backoff = @Backoff(delay = 1000, maxDelay = 5_000, random = true),         dltTopicSuffix = "dead-two")

    Do I understand correctly that the thread reading from the partitionis blocked for a delay time, after which it sends a message to thetopic for re-reading or is a separate thread created for thiswaiting and sending?

  3. And during this delay the application crashes, then the message willnot be sent to the topic TestTopic_N?

  4. And why is maxDelay needed if delay and attempts are specified??


Viewing all articles
Browse latest Browse all 87

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>