Spring integration jms适配器启动两个jms使用者
我在int-jms:inbound-channel-adapter方面有一个问题,当我启动我的应用程序时,我在activemq-webadmin中看到队列有两个使用者Spring integration jms适配器启动两个jms使用者,spring-integration,Spring Integration,我在int-jms:inbound-channel-adapter方面有一个问题,当我启动我的应用程序时,我在activemq-webadmin中看到队列有两个使用者 <int-jms:inbound-channel-adapter id="jmsAdapter" acknowledge="transacted" destination-name="${destinationName}" connection-factory
<int-jms:inbound-channel-adapter
id="jmsAdapter"
acknowledge="transacted"
destination-name="${destinationName}"
connection-factory="cachedConnectionFactory"
channel="inboundChannel"
auto-startup="true" >
<int:poller fixed-delay="100" ></int:poller>
</int-jms:inbound-channel-adapter>
我的配置中有一些错误?问题是org.springframework.jms.connection.CachingConnectionFactory 创建多个会话,每个会话创建一个使用者。有时,同一队列中有3个消费者
为了解决这个问题,我使用cachedConsumeráfalse。这是一个web应用程序吗?如果是这样,最常见的原因是在根上下文和servlet上下文中都声明了适配器。如果没有,请打开org.springframework的调试日志,并检查bean声明和使用者启动的日志。此外:当您将适配器标记为“auto startup=false”时,是否可以确认没有使用者?这不是web应用程序。当我将auto startup=false设置为false时,没有消费者,这是正常的。在我的应用程序中,我有两个部分:第一部分:特定队列的声明性消息驱动端点;第二部分:动态jms出站适配器,带有github中类似于动态ftp的GenericaApplicationContext示例的动态jms出站适配器。当我评论第一部分时,我只能看到一个使用者????在中打开日志调试时,请参见cachedConnectionFactory为队列创建第二个使用者,但当我在cachedConnectionFactory中放置断点时,仅创建了一个使用者—可能是多线程问题?换句话说,我有一个包含消息驱动端点的parentCtx。和包含jms出站适配器的childrenCtx。childrencera是动态创建的。