camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rene Avontuur (JIRA)" <>
Subject [jira] [Updated] (CAMEL-7084) pollEnrich with throwExceptionOnConnectFailed=true & move=../Done/
Date Fri, 03 Jan 2014 01:09:50 GMT


Rene Avontuur updated CAMEL-7084:


I added a unit test which shows the behaviour when the ftp-endpoint is a producer and a failed
login occurs.
For an ftp-producer the following is true:
1- The option 'throwExceptionOnConnectFailed' has no effect 
2- A producer ALWAYS throws an exception that can be handled by an exception clause.
For an ftp-consumer the following is true:
1- The option 'throwExceptionOnConnectFailed' has effect 
2- A consumer NEVER throws an exception that can be handled by an exception clause.
My conclusion: The name of the option 'throwExceptionOnConnectFailed' is misleading. This
option applies also only to consumers. 

Kartik can probably solve his problem by writing an own implementation of PollingConsumerPollStrategy

> pollEnrich with throwExceptionOnConnectFailed=true & move=../Done/
> ------------------------------------------------------------------
>                 Key: CAMEL-7084
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-quartz
>    Affects Versions: 2.11.0
>            Reporter: kartik kudada
>         Attachments:
> Hi,
> I am very new in Camel, i am trying to create a polling mechanism where application look
for file at every 1 hour, if file is found it transfer to destination. I have used spring
DSL with quartz.
> For the polling every hour i am using pollEnrich . It is working fine and it picks up
file every hour and transfer it.
> But when i use throwExceptionOnConnectFailed and move options with pollEnrich, it simply
ignores it, because when i try with wrong username and password, it does not throw any Exception
and does not move processed file to Done folder. 
> Below is the code snipped :-
> <route id="ABC">
>             <from uri="quartz://scheder/mytimer?cron=0+0+*+*+*+?"/>
>             <pollEnrich uri="sftp://username:********@host/myfolder/?include=.***.dat&throwExceptionOnConnectFailed=true&move=../Done/*&moveFailed=../Exception/&stepwise=false&disconnect=true&delay=5000&idempotent=true&delete=true"
>         	 <to uri="{{destination-folder}}"/>
>         </route>
> Any inputs are highly appreciable.  

This message was sent by Atlassian JIRA

View raw message