<bean id="connectionFactory" class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
<property name="host" value="${rabbitmq.host}" />
<property name="port" value="${rabbitmq.port}" />
<property name="username" value="${rabbitmq.username}" />
<property name="password" value="${rabbitmq.password}" />
<property name="virtualHost" value="${rabbitmq.virtualHost}" />
<!-- 缓存模式 CONNECTION CHANNEL,默认的缓存模式是CHANNEL。
rabbitmq 连接、通道及线程池说明和配置
最新推荐文章于 2024-06-29 08:46:23 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)