-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
When I use @RetryableTopic, the errorHandler configuration of @KafkaListener does not take effect and is replaced with SeekToCurrentErrorHandler, I want to print the error stack trace. How should I configure?
@RetryableTopic(
attempts = "2",
backoff = @Backoff(delay = 1000L, multiplier = 2.0),
topicSuffixingStrategy = TopicSuffixingStrategy.SUFFIX_WITH_INDEX_VALUE,
fixedDelayTopicStrategy = FixedDelayStrategy.SINGLE_TOPIC,
listenerContainerFactory = "retryKafkaListenerContainerFactory"
)
@KafkaListener(
topics = TOPIC_ENTERPRISE,
clientIdPrefix = "enterprise",
containerFactory = "kafkaListenerContainerFactory",
errorHandler = "customKafkaListenerErrorHandler"
)
public void enterpriseConsumer(ConsumerRecord<Long, String> record) {
LOGGER.info("{} - topoc:{}, part: {}, offset: {}, key: {}, value: {}", Thread.currentThread().getName(), record.topic(), record.partition(), record.offset(), record.key(), record.value());
int i = 1 / 0;
}