Hi, I'm extending the GenericFileConsumer and setting the Poll Strategy to RemoteFilePollingConsumerPollStrategy. At the moment if there is an error when the pollDirectory method is called the polling is executed again, and again, and again,...
[WARN] RemoteFilePollingConsumerPollStrategy : Trying to recover by disconnecting from remote server forcing a re-connect at next poll: smb://domain\server... [WARN] RemoteFilePollingConsumerPollStrategy : Consumer Consumer[smb://domain\server...] caused by: null java.lang.NullPointerException at MyConsumer.pollDirectory(MyConsumer.java:31) at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:81) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:133) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:88) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ... What I want to happen is to just retry a set number of times and then give up. I can implement my own logic on the MyConsumer class in the pollDirectory method, but I was wondering if there is a nicer (i.e. standard Camel) way to handle this. For example I was thinking to throw a GenericFileOperationFailedException, but then I don't know if the GenericFileConsumer does anything with it. Any idea? -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503.html Sent from the Camel - Users mailing list archive at Nabble.com.