0

I am using spring integration message-driven-channel-adapter to consume messages from Tibco queue and have defined our own error channel to handle any errors.

The issue which I am facing with this set up is that the messages consumed from queue is not acknowledged automatically if there is any run time exception occurs, and the message is redelivering and it goes into a loop. And when I set the acknowledge mode as "auto" (acknowledge="auto") , then message process is stopping gracefully if there is any runtime exception. But as per my understanding if we are not defining the acknowledge mode, spring will default it to "auto". Can someone please help me to understand what is the issue with the set up?

<!--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>
kattoor
  • 195
  • 14
  • It **is** set to AUTO by default - what version are you using? With AUTO, the message should, indeed, be redelivered indefinitely (unless the broker is configured to send it to a DLQ after some number of failures. – Gary Russell Sep 26 '18 at 21:28
  • In my case after explicitly setting the acknowledge as auto, it is not redelivering indefinitely. I am using below spring integration versions: spring-integration-core-4.3.15.RELEASE.jar spring-integration-jms-4.3.15.RELEASE.jar – kattoor Sep 27 '18 at 06:26
  • Please post a complete, simple, project that exhibits this behavior. – Gary Russell Oct 01 '18 at 13:58

0 Answers0