Saturday, 15 August 2015

Error in Spring integration - not processing further messages -



Error in Spring integration - not processing further messages -

i have next configuration

<int:chain input-channel="requestschannel"> <int:splitter ref="abean" method="amethod" /> <!-- routing appropriate processing channels --> <int:recipient-list-router default-output-channel="feedrequestchannel"> <int:recipient channel="whateverrequestchannel" selector-expression="payload.source == 'whatever'"/> </int:recipient-list-router> </int:chain> <int-http:outbound-gateway request-channel="feedrequestchannel" reply-channel="feedresponsechannel" url="{source}" http-method="get" expected-response-type="java.lang.string"> <int-http:uri-variable name="source" expression="payload.getsource()" /> </int-http:outbound-gateway>

now error

org.springframework.integration.messagehandlingexception: http request execution failed uri [{source}] @ org.springframework.integration.http.outbound.httprequestexecutingmessagehandler.handlerequestmessage(httprequestexecutingmessagehandler.java:398) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handlemessageinternal(abstractreplyproducingmessagehandler.java:142) @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73) @ org.springframework.integration.dispatcher.unicastingdispatcher.dodispatch(unicastingdispatcher.java:115) @ org.springframework.integration.dispatcher.unicastingdispatcher.dispatch(unicastingdispatcher.java:102) @ org.springframework.integration.channel.abstractsubscribablechannel.dosend(abstractsubscribablechannel.java:77) @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:178) @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:149) @ org.springframework.integration.core.messagingtemplate.dosend(messagingtemplate.java:330) @ org.springframework.integration.core.messagingtemplate.send(messagingtemplate.java:169) @ org.springframework.integration.router.abstractmessagerouter.handlemessageinternal(abstractmessagerouter.java:150) @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73) @ org.springframework.integration.handler.messagehandlerchain$1.send(messagehandlerchain.java:148) @ org.springframework.integration.core.messagingtemplate.dosend(messagingtemplate.java:330) @ org.springframework.integration.core.messagingtemplate.send(messagingtemplate.java:169) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.sendmessage(abstractreplyproducingmessagehandler.java:228) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.sendreplymessage(abstractreplyproducingmessagehandler.java:212) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.producereply(abstractreplyproducingmessagehandler.java:177) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handleresult(abstractreplyproducingmessagehandler.java:171) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handlemessageinternal(abstractreplyproducingmessagehandler.java:149) @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73) @ org.springframework.integration.handler.messagehandlerchain$1.send(messagehandlerchain.java:148) @ org.springframework.integration.core.messagingtemplate.dosend(messagingtemplate.java:330) @ org.springframework.integration.core.messagingtemplate.send(messagingtemplate.java:169) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.sendmessage(abstractreplyproducingmessagehandler.java:228) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.sendreplymessage(abstractreplyproducingmessagehandler.java:212) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.producereply(abstractreplyproducingmessagehandler.java:177) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handleresult(abstractreplyproducingmessagehandler.java:167) @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handlemessageinternal(abstractreplyproducingmessagehandler.java:149) @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73) @ org.springframework.integration.handler.messagehandlerchain.handlemessageinternal(messagehandlerchain.java:131) @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:73) @ org.springframework.integration.dispatcher.unicastingdispatcher.dodispatch(unicastingdispatcher.java:115) @ org.springframework.integration.dispatcher.unicastingdispatcher.dispatch(unicastingdispatcher.java:102) @ org.springframework.integration.channel.abstractsubscribablechannel.dosend(abstractsubscribablechannel.java:77) @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:178) @ org.springframework.integration.channel.abstractmessagechannel.send(abstractmessagechannel.java:149) @ org.springframework.integration.core.messagingtemplate.dosend(messagingtemplate.java:330) @ org.springframework.integration.core.messagingtemplate.send(messagingtemplate.java:169) @ org.springframework.integration.endpoint.sourcepollingchanneladapter.handlemessage(sourcepollingchanneladapter.java:97) @ org.springframework.integration.endpoint.abstractpollingendpoint.dopoll(abstractpollingendpoint.java:199) @ org.springframework.integration.endpoint.abstractpollingendpoint.access$000(abstractpollingendpoint.java:51) @ org.springframework.integration.endpoint.abstractpollingendpoint$1.call(abstractpollingendpoint.java:143) @ org.springframework.integration.endpoint.abstractpollingendpoint$1.call(abstractpollingendpoint.java:141) @ org.springframework.integration.endpoint.abstractpollingendpoint$poller$1.run(abstractpollingendpoint.java:273) @ org.springframework.integration.util.errorhandlingtaskexecutor$1.run(errorhandlingtaskexecutor.java:52) @ org.springframework.core.task.synctaskexecutor.execute(synctaskexecutor.java:50) @ org.springframework.integration.util.errorhandlingtaskexecutor.execute(errorhandlingtaskexecutor.java:49) @ org.springframework.integration.endpoint.abstractpollingendpoint$poller.run(abstractpollingendpoint.java:268) @ org.springframework.scheduling.support.delegatingerrorhandlingrunnable.run(delegatingerrorhandlingrunnable.java:54) @ org.springframework.scheduling.concurrent.reschedulingrunnable.run(reschedulingrunnable.java:81) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask.run(futuretask.java:262) @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.access$201(scheduledthreadpoolexecutor.java:178) @ java.util.concurrent.scheduledthreadpoolexecutor$scheduledfuturetask.run(scheduledthreadpoolexecutor.java:292) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615) @ java.lang.thread.run(thread.java:724) caused by: org.springframework.web.client.httpclienterrorexception: 404 not found @ org.springframework.web.client.defaultresponseerrorhandler.handleerror(defaultresponseerrorhandler.java:91) @ org.springframework.web.client.resttemplate.handleresponseerror(resttemplate.java:576) @ org.springframework.web.client.resttemplate.doexecute(resttemplate.java:532) @ org.springframework.web.client.resttemplate.execute(resttemplate.java:504) @ org.springframework.web.client.resttemplate.exchange(resttemplate.java:449) @ org.springframework.integration.http.outbound.httprequestexecutingmessagehandler.handlerequestmessage(httprequestexecutingmessagehandler.java:372) ... 57 more

which not problem. amethod returns collection of 2 objects, 1 going through feedrequestchannel , sec through whateverrequestchannel. when above error sec object not processed anymore.

is there config can ignore errors?

since <splitter> produces several messages send, good, if output-channel thread-shift (executor, queue etc.).

having error first message won't impact sec one.

from other side, if need sigle thread (one 1 sending/processing), can play bit <request-handler-advice-chain> each of <outbound-gateway> strangle error using expressionevaluatingrequesthandleradvice trapexception = true

spring spring-integration

No comments:

Post a Comment