我正在使用spring cloud stream和多个活页夹。我尝试使用@StreamRetryTemplate创建自定义RetryTemplate。正在创建自定义RetryTempalte的Bean,但未在AbstractBinder中注入。当我尝试使用单个活页夹时,它工作正常。
版本: Greenwich.SR1
自定义重试模板代码片段
@StreamRetryTemplate
public RetryTemplate myRetryTemplate() {
RetryTemplate retryTemplate = new RetryTemplate();
SimpleRetryPolicy simple = new SimpleRetryPolicy(4);
retryTemplate.setRetryPolicy(simple);
return retryTemplate;
}application.yml:
server:
port: 7777
spring:
cloud:
stream:
binders:
kafka_binder:
type: kafka
environment:
spring:
cloud:
stream:
kafka:
binder:
brokers: localhost:9092
bindings:
input:
destination: EMPLOYEE-TOPIC-R1-P1
binder: kafka_binder
contentType: application/json
group: so51247113发布于 2019-04-30 21:19:46
在我看来像是个bug;打开一个issue on GitHub。
https://stackoverflow.com/questions/55921576
复制相似问题