Mah*_*h G 1 spring-cloud-stream
使用 Spring Cloud Stream 版本 Chelsea.SR2,使用 RabbitMQ 作为消息代理。为了拥有多个消费者,我们使用属性并发(入站消费者的并发)。
如果我们将并发数设置为 50。它从 1 开始,慢慢地增加消费者数量。是否有任何可能的解决方案以更高的数字而不是 1 启动初始消费者计数以提高消费者性能。
你能展示一下你的配置吗?我刚刚测试了它,它完全按照预期工作......
spring.cloud.stream.bindings.input.group=foo
spring.cloud.stream.bindings.input.consumer.concurrency=10
Run Code Online (Sandbox Code Playgroud)
和
@SpringBootApplication
@EnableBinding(Sink.class)
public class So48953227Application {
public static void main(String[] args) {
SpringApplication.run(So48953227Application.class, args);
}
@StreamListener(Sink.INPUT)
public void listen(String in) {
}
}
Run Code Online (Sandbox Code Playgroud)
和
立即,无需发送任何消息
| 归档时间: |
|
| 查看次数: |
3602 次 |
| 最近记录: |