网络波动时因匿名队列的排他性导致无法连接, 队列又因为auto-delete自动删除, 可能通过指定队列名的形式来处理
#method<channel.close>(reply-code=405, reply-text=RESOURCE_LOCKED - cannot obtain exclusive access to locked queue 'springCloudBus.anonymous.xxxxx' in vhost '/', class-id=50, method-id=10)
#method<channel.close>(reply-code=404, reply-text=NOT_FOUND - no queue 'springCloudBus.anonymous.xxxxx' in vhost '/', class-id=50, method-id=10) springCloudBus.anonymous.xxxxx 队列特性:
x-queue-master-locator: client-local
exclusive: true # 排他性
auto-delete: true # 自动删除 RabbitExchangeQueueProvisioner.doProvisionConsumerDestination
group 参数为空的时候,自动创建匿名的排他队列
spring:
cloud:
stream:
default:
group: ${spring.application.name}-${spring.cloud.client.ip-address}-${server.port}
rabbit:
bindings:
springCloudBusInput:
consumer:
# 为true时,使用‘group’作为配置刷新队列的名称
queue-name-group-only: true