gpt4 book ai didi

spring - RabbitMQ + Spring 云流 : usage of groups

转载 作者:行者123 更新时间:2023-12-04 02:53:26 26 4
gpt4 key购买 nike

当使用 RabbitMQ + Spring 云流时,您可以在 application.properties 文件中定义以下属性:

spring.cloud.stream.bindings.input1.destination=someDest
spring.cloud.stream.bindings.input1.group=someGroup

我猜“目的地”是指 RabbitMQ 队列,但这里的“组”是什么意思?

谢谢!

最佳答案

目的地 表示主题交换group 表示绑定(bind)到该交换器的队列。因此,如果多个应用程序使用不同的组,它们可能会订阅相同的目的地并获得相同的消息。如果组相同,则只有一个消费者实例会收到一条消息。

有关详细信息,请参阅文档:http://cloud.spring.io/spring-cloud-static/spring-cloud-stream-binder-rabbit/2.1.0.RC4/single/spring-cloud-stream-binder-rabbit.html#_rabbitmq_binder_overview

关于spring - RabbitMQ + Spring 云流 : usage of groups,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54012270/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com