Spring AMQP-发布者确认不关闭未使用的频道

问题描述 投票:0回答:1

发布和获取ack / nacks的工作正常。我在这里的担心是,它不会关闭未使用的额外通道。另一方面,将发布者确认设置为false时,未使用的通道将按预期关闭。

ConnectionFactory示例:

cachingConnectionFactory.setCacheMode(CachingConnectionFactory.CacheMode.CHANNEL);                                       
cachingConnectionFactory.setChannelCacheSize(confirmChannelCacheSize);                                      
cachingConnectionFactory.setPublisherConfirms(Boolean.TRUE);
cachingConnectionFactory.setPublisherReturns(Boolean.TRUE);

RabbitTemplate示例:

template.setMandatory(true);
template.setConfirmCallback(deepConfirmCallback);
template.setReturnCallback(returnCallback);

Spring AMQP依赖项:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-amqp</artifactId>
    <version>2.1.1.RELEASE</version>
</dependency>
java spring-boot amqp spring-amqp rmq
1个回答
0
投票

转载;正在调查.....

© www.soinside.com 2019 - 2024. All rights reserved.