Non-Blocking Retries

版本 2.9 改变了启动基础架构 Bean 的机制;请参阅 Configuration 了解现在启动该功能所需的两种机制。

Version 2.9 changed the mechanism to bootstrap infrastructure beans; see Configuration for the two mechanisms that are now required to bootstrap the feature.

使用 Kafka 实现无阻塞重试/DLT 功能通常需要设置额外主题,以及创建和配置相应的侦听器。从 2.7 版开始,Spring for Apache Kafka 通过 @RetryableTopic 注解和 RetryTopicConfiguration 类提供对它们的原生支持,以简化引导过程。

Achieving non-blocking retry / dlt functionality with Kafka usually requires setting up extra topics and creating and configuring the corresponding listeners. Since 2.7 Spring for Apache Kafka offers support for that via the @RetryableTopic annotation and RetryTopicConfiguration class to simplify that bootstrapping.

从 3.2 开始,Spring for Apache Kafka 支持采用 @KafkaListener on a Class 的非阻塞重试。

Since 3.2, Spring for Apache Kafka supports non-blocking retries with @KafkaListener on a Class.

Batch Listeners 不支持非阻塞重试。

Non-blocking retries are not supported with Batch Listeners.

非阻塞重试无法与 Container Transactions 结合。

Non-Blocking Retries cannot combine with Container Transactions.