Spring 云流:试图暂停不支持可暂停 bean 的组件

Spring cloud stream : Attempted to pause a component that does not support Pausable bean

我是 spring 云流的新手。我正在使用我们团队成员之一编写的活页夹。 我在我的应用程序中使用执行器的 /bindings 端点到 pause/resume 消费者。但是我收到一个错误

o.s.c.s.b.AbstractMessageChannelBinder : Attempted to pause a component that does not support Pausable bean 'XXX'

Qn 1. 我猜是因为我使用的活页夹不支持 pause/resume 操作。任何人都可以指出一些示例,我可以在其中找到如何将此功能添加到活页夹吗?

Qn 2. 我也尝试 start/stop 使用执行器端点。停止工作正常,但在开始时,出现以下错误

o.s.c.s.b.AbstractMessageChannelBinder : Can not re-bind an anonymous binding

有人可以就此错误提供一些意见吗..

它不是绑定器,而是实际代理的基础功能。只有 Kafka 支持暂停,这在 Kafka 中有特殊的含义;其中 暂停 消费者不会导致消费者重新平衡,而 停止 消费者会。

您的绑定是匿名的,因为 group 名称是根据函数名称生成的。这就是错误消息告诉您的内容。您必须明确声明组名。

spring.cloud.stream.bindings.uppercase-in-0.destination=myDestination
spring.cloud.stream.bindings.uppercase-in-0.group=myGroup

您可以获得更多信息here