我有一个spring-cloud-stream-kafka项目,下面是application. yaml的缩写部分,我对将属性spring.cloud.stream.kafka.bindings.myNamedChannel.dlqPartitions
的值注入代码很感兴趣:
spring:
cloud:
stream:
kafka:
bindings:
myNamedChannel-in-0:
consumer:
start-offset: earliest
enable-dlq: true
dlq-partitions: 4
dlq-name: myNamedChannel-dlt
我试过对以下内容进行排列,但没有任何成功。像这样的事情可能吗?
@Value("${spring.cloud.stream.kafka.bindings.myNamedChannel.consumer.dlqPartitions}")
private int CONTEXT_RETRY_PARTITION_COUNT;
1条答案
按热度按时间gjmwrych1#
明白了。这样行: