首页 > 解决方案 > spring 集成消息驱动通道适配器中的自动确认问题

问题描述

我正在使用 spring 集成消息驱动通道适配器来使用来自 Tibco 队列的消息,并定义了我们自己的错误通道来处理任何错误。

我在此设置中面临的问题是,如果发生任何运行时异常,则不会自动确认从队列中消耗的消息,并且消息正在重新传递并进入循环。当我将确认模式设置为"auto" (acknowledge="auto")时,如果有任何运行时异常,消息进程就会正常停止。但根据我的理解,如果我们没有定义确认模式,spring 会将其默认为“自动”。有人可以帮我了解设置有什么问题吗?

<!--Consumer set up -->
<int-jms:message-driven-channel-adapter id="inputChannel" destination="inputQueue" 
                                            connection-factory="authConnFactory"
                                            error-channel="customErrorChannel"/>

<!-- Error channel -->                                          
<int:chain input-channel="customErrorChannel" >
        <!-- Inserting into table-->
        <int:recipient-list-router>
            <int:recipient channel="publishToexceptionQueue"/>
        </int:recipient-list-router>
    </int:chain>

标签: springspring-integrationspring-jms

解决方案


推荐阅读