Spring Integration消息驱动的通道适配器中的自动确认问题

时间:2018-09-26 13:13:47

标签: spring spring-integration spring-jms

我正在使用spring集成的message-driven-channel-adapter来消耗Tibco队列中的消息,并定义了我们自己的错误通道来处理任何错误。

此设置面临的问题是,如果发生任何运行时异常,则不会自动确认从队列使用的消息,并且该消息正在重新传递并进入循环。 并且当我将确认模式设置为“ auto” (acknowledge =“ auto”)时,如果有任何运行时异常,则消息过程会正常停止 em>。 但是据我了解,如果我们没有定义确认模式,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>

0 个答案:

没有答案