Giriş
Açıklaması şöyle
When Using @RetryableTopic for methods annotated with KafkaListener, provide a @Configuration class extends RetryTopicConfigurationSupport .
Örnek
Şöyle yaparız
@Configuration @RequiredArgsConstructor @EnableScheduling @Slf4j public class KafkaConfig extends RetryTopicConfigurationSupport { @Override protected void configureBlockingRetries(BlockingRetriesConfigurer blockingRetries) { blockingRetries .retryOn(IOException.class) .backOff(new FixedBackOff(5000, 3)); } }
Hiç yorum yok:
Yorum Gönder