Re: Camel RemoteFilePollingConsumerPollStrategy and retry
Then you can stop the consumer in the rollback method when you want to give up On Mon, Jan 6, 2014 at 6:23 PM, geppo geppore...@gmail.com wrote: yes -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503p5745634.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io
Re: Camel RemoteFilePollingConsumerPollStrategy and retry
Thank you! -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503p5745665.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel RemoteFilePollingConsumerPollStrategy and retry
yes -- View this message in context: http://camel.465427.n5.nabble.com/Camel-RemoteFilePollingConsumerPollStrategy-and-retry-tp5745503p5745634.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Camel RemoteFilePollingConsumerPollStrategy and retry
Hi What do you mean by just give up do you mean the consumer should be stopped and never poll again? On Fri, Jan 3, 2014 at 5:49 PM, geppo geppore...@gmail.com wrote: 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. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen Make your Camel applications look hawt, try: http://hawt.io
Camel RemoteFilePollingConsumerPollStrategy and retry
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.