You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "S. Ali Tokmen" <sa...@bull.net> on 2010/09/15 11:58:27 UTC

The delay option seems not to be working in CAMEL Java DSL mode

  Hello

The route I'm currently interested in uses CAMEL in Java DSL mode. It 
basically copies files from an FTP server, hence the from clause:

    ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true

As a result, the delay is supposed to be 60 seconds. But here's what I 
get in the logs:

    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
    logged in to: ftp://camel@production26:21:21
    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
    logged in to: ftp://camel@production26:21:21
    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
    logged in to: ftp://camel@production26:21:21
    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
    logged in to: ftp://camel@production26:21:21

Which indicates that CAMEL about twice a second. After looking to it 
with a debugger, I've seen that this delay comes from the default value 
of ScheduledPollConsumer.delay (500).

I therefore see that the "delay" attribute of the consumer is not 
changed no matter what delay I put in my URL. Is this an expected behaviour?

Cheers

-- 

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


Re: upgrade Camel in Fuse

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Sep 17, 2010 at 12:13 PM,  <pa...@orange-ftgroup.com> wrote:
> Hi,
> I hope I'm on the right mailing list.
> I'm using Fuse 4.2 and I'm interested in a feature recently implemented in Camel (dynamic router to be able to select the next endpoint dynamically).
> I'm a bit confused by the relationship between Fuse Mediation Router & Apache Camel.
> Can I upgrade the version of Camel that Fuse is using (and how?) or do I have to wait for a new Fuse distribution to be released?
>

There has not been a release of Camel which contains the dynamicRouter
implementation.
Camel 2.5 is in the talks and will be released at the end of this
month. We are awaiting Karaf 2.1 to be released beforehand.

FuseSource will also do a FUSE MR 2.5.0 release but after the Apache release.


> Thanks, and thank you for Camel which is a great tool.
> Patrice
>
>
> *********************************
> This message and any attachments (the "message") are confidential and intended solely for the addressees.
> Any unauthorised use or dissemination is prohibited.
> Messages are susceptible to alteration.
> France Telecom Group shall not be liable for the message if altered, changed or falsified.
> If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
> ********************************
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

upgrade Camel in Fuse

Posted by pa...@orange-ftgroup.com.
Hi,
I hope I'm on the right mailing list.
I'm using Fuse 4.2 and I'm interested in a feature recently implemented in Camel (dynamic router to be able to select the next endpoint dynamically).
I'm a bit confused by the relationship between Fuse Mediation Router & Apache Camel.
Can I upgrade the version of Camel that Fuse is using (and how?) or do I have to wait for a new Fuse distribution to be released?

Thanks, and thank you for Camel which is a great tool.
Patrice


*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees. 
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration. 
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************


Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Sep 17, 2010 at 10:56 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
>  Hello Claus
>
> Your patch is working perfectly.
>
> Thank you for the fast and accurate response.
>

Thanks for testing and reporting back. Yeah it was harder to get to
the bottom since the ref: component is more seldom used, and you didnt
mention you used it.
And the bug was only with the delay/initialDelay option being cleared.
But now we got it nailed and there is an unit test to catch
regressions.



> Have a nice week end
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
> On 16/09/2010 18:33, Claus Ibsen wrote:
>>
>> Hi
>>
>> Thanks for digging into the code.
>>
>> I have created a ticket to track this
>> https://issues.apache.org/activemq/browse/CAMEL-3130
>>
>> And also reproduced it in camel-core so I will work on a fix.
>>
>>
>> On Thu, Sep 16, 2010 at 5:57 PM, S. Ali Tokmen
>> <sa...@bull.net>  wrote:
>>>
>>>  Hello
>>>
>>> I have found why, and now I'll try to explain:
>>>
>>>   * We actually do not use the endpoint names in the routes but a
>>>     registry, implemented by RefComponent
>>>   * We therefore do from("registry:ftpTest")
>>>   * In the registry, "ftpTest" actually redirects to ftp://... with
>>>     the delay option
>>>   * During route creation:
>>>         o The DefaultCamelContext attempts to resolve registry:ftpTest
>>>         o It finds that registry is the RefComponent, therefore
>>>           creates endpoint ftpTest on RefComponent
>>>         o RefComponent finds the actual URL (with the delay option)
>>>           and creates the FTP endpoint. At that point, the delay is
>>>           correctly set.
>>>         o RefComponent's createEndpoint method (inherited from
>>>           DefaultComponent), when returning, calls
>>>           endpoint.configureProperties(parameters) with the parameters
>>>           of the REGISTRY url (which has no parameters!)
>>>   * Hence, the delay set by the actual FTP component gets destroyed by
>>>     the RefComponent
>>>
>>> Any solution ideas?
>>>
>>> Cheers
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@bull.net
>>>
>>> Office: +33 4 76 29 76 19
>>> GSM:    +33 66 43 00 555
>>>
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>>
>>>
>>> On 16/09/2010 12:14, S. Ali Tokmen wrote:
>>>>
>>>>  Hello
>>>>
>>>> OK, can you indicate me any source locations I should be looking at,
>>>> that
>>>> normally sets the delay option? My reference lookups on the setDelay
>>>> method
>>>> are hopeless.
>>>>
>>>> Thank you
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@bull.net
>>>>
>>>> Office: +33 4 76 29 76 19
>>>> GSM:    +33 66 43 00 555
>>>>
>>>> Bull, Architect of an Open World TM
>>>> http://www.bull.com
>>>>
>>>>
>>>> On 16/09/2010 08:40, Claus Ibsen wrote:
>>>>>
>>>>> Must be a problem in your end.
>>>>>
>>>>> I added unit test which works nicely
>>>>> http://svn.apache.org/viewvc?rev=997603&view=rev
>>>>>
>>>>> The delay option is set using a type converter String ->    long, so
>>>>> you
>>>>> have something f**** up in your system if the type converters can't
>>>>> kick in and convert.
>>>>> But this is OSGi so you never know what plays trick on you.
>>>>>
>>>>>
>>>>> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
>>>>> <sa...@bull.net>    wrote:
>>>>>>
>>>>>>  Hello
>>>>>>
>>>>>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I
>>>>>> have
>>>>>> not tried other modes.
>>>>>>
>>>>>> Apparently it has always been occuring, but it has started being
>>>>>> "visible"
>>>>>> as we added the "disconnect" option (which started displaying the
>>>>>> logs).
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> S. Ali Tokmen
>>>>>> savas-ali.tokmen@bull.net
>>>>>>
>>>>>> Office: +33 4 76 29 76 19
>>>>>> GSM:    +33 66 43 00 555
>>>>>>
>>>>>> Bull, Architect of an Open World TM
>>>>>> http://www.bull.com
>>>>>>
>>>>>>
>>>>>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> Could you at least remember to state which version of Camel! And also
>>>>>>> did it work in a previous version? Have you tried with newer
>>>>>>> versions?
>>>>>>> And have you tried from an unit test outside any container
>>>>>>> (especially
>>>>>>> OSGi containers).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>>>>>> <sa...@bull.net>      wrote:
>>>>>>>>
>>>>>>>>  Hello
>>>>>>>>
>>>>>>>> The route I'm currently interested in uses CAMEL in Java DSL mode.
>>>>>>>> It
>>>>>>>> basically copies files from an FTP server, hence the from clause:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>>>>>>
>>>>>>>> As a result, the delay is supposed to be 60 seconds. But here's what
>>>>>>>> I
>>>>>>>> get
>>>>>>>> in the logs:
>>>>>>>>
>>>>>>>>   2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>>>   2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>>>   2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>>>   2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>>>
>>>>>>>> Which indicates that CAMEL about twice a second. After looking to it
>>>>>>>> with
>>>>>>>> a
>>>>>>>> debugger, I've seen that this delay comes from the default value of
>>>>>>>> ScheduledPollConsumer.delay (500).
>>>>>>>>
>>>>>>>> I therefore see that the "delay" attribute of the consumer is not
>>>>>>>> changed
>>>>>>>> no
>>>>>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> S. Ali Tokmen
>>>>>>>> savas-ali.tokmen@bull.net
>>>>>>>>
>>>>>>>> Office: +33 4 76 29 76 19
>>>>>>>> GSM:    +33 66 43 00 555
>>>>>>>>
>>>>>>>> Bull, Architect of an Open World TM
>>>>>>>> http://www.bull.com
>>>>>>>>
>>>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by "S. Ali Tokmen" <sa...@bull.net>.
  Hello Claus

Your patch is working perfectly.

Thank you for the fast and accurate response.

Have a nice week end

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


On 16/09/2010 18:33, Claus Ibsen wrote:
> Hi
>
> Thanks for digging into the code.
>
> I have created a ticket to track this
> https://issues.apache.org/activemq/browse/CAMEL-3130
>
> And also reproduced it in camel-core so I will work on a fix.
>
>
> On Thu, Sep 16, 2010 at 5:57 PM, S. Ali Tokmen
> <sa...@bull.net>  wrote:
>>   Hello
>>
>> I have found why, and now I'll try to explain:
>>
>>    * We actually do not use the endpoint names in the routes but a
>>      registry, implemented by RefComponent
>>    * We therefore do from("registry:ftpTest")
>>    * In the registry, "ftpTest" actually redirects to ftp://... with
>>      the delay option
>>    * During route creation:
>>          o The DefaultCamelContext attempts to resolve registry:ftpTest
>>          o It finds that registry is the RefComponent, therefore
>>            creates endpoint ftpTest on RefComponent
>>          o RefComponent finds the actual URL (with the delay option)
>>            and creates the FTP endpoint. At that point, the delay is
>>            correctly set.
>>          o RefComponent's createEndpoint method (inherited from
>>            DefaultComponent), when returning, calls
>>            endpoint.configureProperties(parameters) with the parameters
>>            of the REGISTRY url (which has no parameters!)
>>    * Hence, the delay set by the actual FTP component gets destroyed by
>>      the RefComponent
>>
>> Any solution ideas?
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>> On 16/09/2010 12:14, S. Ali Tokmen wrote:
>>>   Hello
>>>
>>> OK, can you indicate me any source locations I should be looking at, that
>>> normally sets the delay option? My reference lookups on the setDelay method
>>> are hopeless.
>>>
>>> Thank you
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@bull.net
>>>
>>> Office: +33 4 76 29 76 19
>>> GSM:    +33 66 43 00 555
>>>
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>>
>>>
>>> On 16/09/2010 08:40, Claus Ibsen wrote:
>>>> Must be a problem in your end.
>>>>
>>>> I added unit test which works nicely
>>>> http://svn.apache.org/viewvc?rev=997603&view=rev
>>>>
>>>> The delay option is set using a type converter String ->    long, so you
>>>> have something f**** up in your system if the type converters can't
>>>> kick in and convert.
>>>> But this is OSGi so you never know what plays trick on you.
>>>>
>>>>
>>>> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
>>>> <sa...@bull.net>    wrote:
>>>>>   Hello
>>>>>
>>>>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I
>>>>> have
>>>>> not tried other modes.
>>>>>
>>>>> Apparently it has always been occuring, but it has started being
>>>>> "visible"
>>>>> as we added the "disconnect" option (which started displaying the logs).
>>>>>
>>>>> Cheers
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@bull.net
>>>>>
>>>>> Office: +33 4 76 29 76 19
>>>>> GSM:    +33 66 43 00 555
>>>>>
>>>>> Bull, Architect of an Open World TM
>>>>> http://www.bull.com
>>>>>
>>>>>
>>>>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>>>>> Hi
>>>>>>
>>>>>> Could you at least remember to state which version of Camel! And also
>>>>>> did it work in a previous version? Have you tried with newer versions?
>>>>>> And have you tried from an unit test outside any container (especially
>>>>>> OSGi containers).
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>>>>> <sa...@bull.net>      wrote:
>>>>>>>   Hello
>>>>>>>
>>>>>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>>>>>> basically copies files from an FTP server, hence the from clause:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>>>>>
>>>>>>> As a result, the delay is supposed to be 60 seconds. But here's what I
>>>>>>> get
>>>>>>> in the logs:
>>>>>>>
>>>>>>>    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>>>    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>>>    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>>>    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>>>
>>>>>>> Which indicates that CAMEL about twice a second. After looking to it
>>>>>>> with
>>>>>>> a
>>>>>>> debugger, I've seen that this delay comes from the default value of
>>>>>>> ScheduledPollConsumer.delay (500).
>>>>>>>
>>>>>>> I therefore see that the "delay" attribute of the consumer is not
>>>>>>> changed
>>>>>>> no
>>>>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> S. Ali Tokmen
>>>>>>> savas-ali.tokmen@bull.net
>>>>>>>
>>>>>>> Office: +33 4 76 29 76 19
>>>>>>> GSM:    +33 66 43 00 555
>>>>>>>
>>>>>>> Bull, Architect of an Open World TM
>>>>>>> http://www.bull.com
>>>>>>>
>>>>>>>
>>>>
>>>
>>>
>>>
>
>


Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Thanks for digging into the code.

I have created a ticket to track this
https://issues.apache.org/activemq/browse/CAMEL-3130

And also reproduced it in camel-core so I will work on a fix.


On Thu, Sep 16, 2010 at 5:57 PM, S. Ali Tokmen
<sa...@bull.net> wrote:
>  Hello
>
> I have found why, and now I'll try to explain:
>
>   * We actually do not use the endpoint names in the routes but a
>     registry, implemented by RefComponent
>   * We therefore do from("registry:ftpTest")
>   * In the registry, "ftpTest" actually redirects to ftp://... with
>     the delay option
>   * During route creation:
>         o The DefaultCamelContext attempts to resolve registry:ftpTest
>         o It finds that registry is the RefComponent, therefore
>           creates endpoint ftpTest on RefComponent
>         o RefComponent finds the actual URL (with the delay option)
>           and creates the FTP endpoint. At that point, the delay is
>           correctly set.
>         o RefComponent's createEndpoint method (inherited from
>           DefaultComponent), when returning, calls
>           endpoint.configureProperties(parameters) with the parameters
>           of the REGISTRY url (which has no parameters!)
>   * Hence, the delay set by the actual FTP component gets destroyed by
>     the RefComponent
>
> Any solution ideas?
>
> Cheers
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
> On 16/09/2010 12:14, S. Ali Tokmen wrote:
>>
>>  Hello
>>
>> OK, can you indicate me any source locations I should be looking at, that
>> normally sets the delay option? My reference lookups on the setDelay method
>> are hopeless.
>>
>> Thank you
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>> On 16/09/2010 08:40, Claus Ibsen wrote:
>>>
>>> Must be a problem in your end.
>>>
>>> I added unit test which works nicely
>>> http://svn.apache.org/viewvc?rev=997603&view=rev
>>>
>>> The delay option is set using a type converter String ->  long, so you
>>> have something f**** up in your system if the type converters can't
>>> kick in and convert.
>>> But this is OSGi so you never know what plays trick on you.
>>>
>>>
>>> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
>>> <sa...@bull.net>  wrote:
>>>>
>>>>  Hello
>>>>
>>>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I
>>>> have
>>>> not tried other modes.
>>>>
>>>> Apparently it has always been occuring, but it has started being
>>>> "visible"
>>>> as we added the "disconnect" option (which started displaying the logs).
>>>>
>>>> Cheers
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@bull.net
>>>>
>>>> Office: +33 4 76 29 76 19
>>>> GSM:    +33 66 43 00 555
>>>>
>>>> Bull, Architect of an Open World TM
>>>> http://www.bull.com
>>>>
>>>>
>>>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Could you at least remember to state which version of Camel! And also
>>>>> did it work in a previous version? Have you tried with newer versions?
>>>>> And have you tried from an unit test outside any container (especially
>>>>> OSGi containers).
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>>>> <sa...@bull.net>    wrote:
>>>>>>
>>>>>>  Hello
>>>>>>
>>>>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>>>>> basically copies files from an FTP server, hence the from clause:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>>>>
>>>>>> As a result, the delay is supposed to be 60 seconds. But here's what I
>>>>>> get
>>>>>> in the logs:
>>>>>>
>>>>>>   2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>   2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>   2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>   2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>>>   logged in to: ftp://camel@production26:21:21
>>>>>>
>>>>>> Which indicates that CAMEL about twice a second. After looking to it
>>>>>> with
>>>>>> a
>>>>>> debugger, I've seen that this delay comes from the default value of
>>>>>> ScheduledPollConsumer.delay (500).
>>>>>>
>>>>>> I therefore see that the "delay" attribute of the consumer is not
>>>>>> changed
>>>>>> no
>>>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> --
>>>>>>
>>>>>> S. Ali Tokmen
>>>>>> savas-ali.tokmen@bull.net
>>>>>>
>>>>>> Office: +33 4 76 29 76 19
>>>>>> GSM:    +33 66 43 00 555
>>>>>>
>>>>>> Bull, Architect of an Open World TM
>>>>>> http://www.bull.com
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>
>>
>>
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by "S. Ali Tokmen" <sa...@bull.net>.
  Hello

I have found why, and now I'll try to explain:

    * We actually do not use the endpoint names in the routes but a
      registry, implemented by RefComponent
    * We therefore do from("registry:ftpTest")
    * In the registry, "ftpTest" actually redirects to ftp://... with
      the delay option
    * During route creation:
          o The DefaultCamelContext attempts to resolve registry:ftpTest
          o It finds that registry is the RefComponent, therefore
            creates endpoint ftpTest on RefComponent
          o RefComponent finds the actual URL (with the delay option)
            and creates the FTP endpoint. At that point, the delay is
            correctly set.
          o RefComponent's createEndpoint method (inherited from
            DefaultComponent), when returning, calls
            endpoint.configureProperties(parameters) with the parameters
            of the REGISTRY url (which has no parameters!)
    * Hence, the delay set by the actual FTP component gets destroyed by
      the RefComponent

Any solution ideas?

Cheers

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


On 16/09/2010 12:14, S. Ali Tokmen wrote:
>  Hello
>
> OK, can you indicate me any source locations I should be looking at, 
> that normally sets the delay option? My reference lookups on the 
> setDelay method are hopeless.
>
> Thank you
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
> On 16/09/2010 08:40, Claus Ibsen wrote:
>> Must be a problem in your end.
>>
>> I added unit test which works nicely
>> http://svn.apache.org/viewvc?rev=997603&view=rev
>>
>> The delay option is set using a type converter String ->  long, so you
>> have something f**** up in your system if the type converters can't
>> kick in and convert.
>> But this is OSGi so you never know what plays trick on you.
>>
>>
>> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
>> <sa...@bull.net>  wrote:
>>>   Hello
>>>
>>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. 
>>> I have
>>> not tried other modes.
>>>
>>> Apparently it has always been occuring, but it has started being 
>>> "visible"
>>> as we added the "disconnect" option (which started displaying the 
>>> logs).
>>>
>>> Cheers
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@bull.net
>>>
>>> Office: +33 4 76 29 76 19
>>> GSM:    +33 66 43 00 555
>>>
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>>
>>>
>>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>>> Hi
>>>>
>>>> Could you at least remember to state which version of Camel! And also
>>>> did it work in a previous version? Have you tried with newer versions?
>>>> And have you tried from an unit test outside any container (especially
>>>> OSGi containers).
>>>>
>>>>
>>>>
>>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>>> <sa...@bull.net>    wrote:
>>>>>   Hello
>>>>>
>>>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>>>> basically copies files from an FTP server, hence the from clause:
>>>>>
>>>>>
>>>>>
>>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true 
>>>>>
>>>>>
>>>>> As a result, the delay is supposed to be 60 seconds. But here's 
>>>>> what I
>>>>> get
>>>>> in the logs:
>>>>>
>>>>>    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>>    logged in to: ftp://camel@production26:21:21
>>>>>
>>>>> Which indicates that CAMEL about twice a second. After looking to 
>>>>> it with
>>>>> a
>>>>> debugger, I've seen that this delay comes from the default value of
>>>>> ScheduledPollConsumer.delay (500).
>>>>>
>>>>> I therefore see that the "delay" attribute of the consumer is not 
>>>>> changed
>>>>> no
>>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>>
>>>>> Cheers
>>>>>
>>>>> -- 
>>>>>
>>>>> S. Ali Tokmen
>>>>> savas-ali.tokmen@bull.net
>>>>>
>>>>> Office: +33 4 76 29 76 19
>>>>> GSM:    +33 66 43 00 555
>>>>>
>>>>> Bull, Architect of an Open World TM
>>>>> http://www.bull.com
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
>
>
>

Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by "S. Ali Tokmen" <sa...@bull.net>.
  Hello

OK, can you indicate me any source locations I should be looking at, 
that normally sets the delay option? My reference lookups on the 
setDelay method are hopeless.

Thank you

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


On 16/09/2010 08:40, Claus Ibsen wrote:
> Must be a problem in your end.
>
> I added unit test which works nicely
> http://svn.apache.org/viewvc?rev=997603&view=rev
>
> The delay option is set using a type converter String ->  long, so you
> have something f**** up in your system if the type converters can't
> kick in and convert.
> But this is OSGi so you never know what plays trick on you.
>
>
> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
> <sa...@bull.net>  wrote:
>>   Hello
>>
>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I have
>> not tried other modes.
>>
>> Apparently it has always been occuring, but it has started being "visible"
>> as we added the "disconnect" option (which started displaying the logs).
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>> Hi
>>>
>>> Could you at least remember to state which version of Camel! And also
>>> did it work in a previous version? Have you tried with newer versions?
>>> And have you tried from an unit test outside any container (especially
>>> OSGi containers).
>>>
>>>
>>>
>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>> <sa...@bull.net>    wrote:
>>>>   Hello
>>>>
>>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>>> basically copies files from an FTP server, hence the from clause:
>>>>
>>>>
>>>>
>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>>
>>>> As a result, the delay is supposed to be 60 seconds. But here's what I
>>>> get
>>>> in the logs:
>>>>
>>>>    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>
>>>> Which indicates that CAMEL about twice a second. After looking to it with
>>>> a
>>>> debugger, I've seen that this delay comes from the default value of
>>>> ScheduledPollConsumer.delay (500).
>>>>
>>>> I therefore see that the "delay" attribute of the consumer is not changed
>>>> no
>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>
>>>> Cheers
>>>>
>>>> --
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@bull.net
>>>>
>>>> Office: +33 4 76 29 76 19
>>>> GSM:    +33 66 43 00 555
>>>>
>>>> Bull, Architect of an Open World TM
>>>> http://www.bull.com
>>>>
>>>>
>>>
>>
>
>


Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by Willem Jiang <wi...@gmail.com>.
Maybe you can write a simple test bundle to see if the camel converter 
works for you.

Willem
On 9/16/10 2:40 PM, Claus Ibsen wrote:
> Must be a problem in your end.
>
> I added unit test which works nicely
> http://svn.apache.org/viewvc?rev=997603&view=rev
>
> The delay option is set using a type converter String ->  long, so you
> have something f**** up in your system if the type converters can't
> kick in and convert.
> But this is OSGi so you never know what plays trick on you.
>
>
> On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
> <sa...@bull.net>  wrote:
>>   Hello
>>
>> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I have
>> not tried other modes.
>>
>> Apparently it has always been occuring, but it has started being "visible"
>> as we added the "disconnect" option (which started displaying the logs).
>>
>> Cheers
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>> On 15/09/2010 13:47, Claus Ibsen wrote:
>>>
>>> Hi
>>>
>>> Could you at least remember to state which version of Camel! And also
>>> did it work in a previous version? Have you tried with newer versions?
>>> And have you tried from an unit test outside any container (especially
>>> OSGi containers).
>>>
>>>
>>>
>>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>>> <sa...@bull.net>    wrote:
>>>>
>>>>   Hello
>>>>
>>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>>> basically copies files from an FTP server, hence the from clause:
>>>>
>>>>
>>>>
>>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>>
>>>> As a result, the delay is supposed to be 60 seconds. But here's what I
>>>> get
>>>> in the logs:
>>>>
>>>>    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>>    logged in to: ftp://camel@production26:21:21
>>>>
>>>> Which indicates that CAMEL about twice a second. After looking to it with
>>>> a
>>>> debugger, I've seen that this delay comes from the default value of
>>>> ScheduledPollConsumer.delay (500).
>>>>
>>>> I therefore see that the "delay" attribute of the consumer is not changed
>>>> no
>>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>>
>>>> Cheers
>>>>
>>>> --
>>>>
>>>> S. Ali Tokmen
>>>> savas-ali.tokmen@bull.net
>>>>
>>>> Office: +33 4 76 29 76 19
>>>> GSM:    +33 66 43 00 555
>>>>
>>>> Bull, Architect of an Open World TM
>>>> http://www.bull.com
>>>>
>>>>
>>>
>>>
>>
>>
>
>
>


Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by Claus Ibsen <cl...@gmail.com>.
Must be a problem in your end.

I added unit test which works nicely
http://svn.apache.org/viewvc?rev=997603&view=rev

The delay option is set using a type converter String -> long, so you
have something f**** up in your system if the type converters can't
kick in and convert.
But this is OSGi so you never know what plays trick on you.


On Wed, Sep 15, 2010 at 1:57 PM, S. Ali Tokmen
<sa...@bull.net> wrote:
>  Hello
>
> The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I have
> not tried other modes.
>
> Apparently it has always been occuring, but it has started being "visible"
> as we added the "disconnect" option (which started displaying the logs).
>
> Cheers
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>
> On 15/09/2010 13:47, Claus Ibsen wrote:
>>
>> Hi
>>
>> Could you at least remember to state which version of Camel! And also
>> did it work in a previous version? Have you tried with newer versions?
>> And have you tried from an unit test outside any container (especially
>> OSGi containers).
>>
>>
>>
>> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
>> <sa...@bull.net>  wrote:
>>>
>>>  Hello
>>>
>>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>>> basically copies files from an FTP server, hence the from clause:
>>>
>>>
>>>
>>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>>
>>> As a result, the delay is supposed to be 60 seconds. But here's what I
>>> get
>>> in the logs:
>>>
>>>   2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>>   logged in to: ftp://camel@production26:21:21
>>>   2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>>   logged in to: ftp://camel@production26:21:21
>>>   2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>>   logged in to: ftp://camel@production26:21:21
>>>   2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>>   logged in to: ftp://camel@production26:21:21
>>>
>>> Which indicates that CAMEL about twice a second. After looking to it with
>>> a
>>> debugger, I've seen that this delay comes from the default value of
>>> ScheduledPollConsumer.delay (500).
>>>
>>> I therefore see that the "delay" attribute of the consumer is not changed
>>> no
>>> matter what delay I put in my URL. Is this an expected behaviour?
>>>
>>> Cheers
>>>
>>> --
>>>
>>> S. Ali Tokmen
>>> savas-ali.tokmen@bull.net
>>>
>>> Office: +33 4 76 29 76 19
>>> GSM:    +33 66 43 00 555
>>>
>>> Bull, Architect of an Open World TM
>>> http://www.bull.com
>>>
>>>
>>
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by "S. Ali Tokmen" <sa...@bull.net>.
  Hello

The problems occurs with CAMEL 2.2.0, 2.3.0 and 2.4.0; in OSGi mode. I 
have not tried other modes.

Apparently it has always been occuring, but it has started being 
"visible" as we added the "disconnect" option (which started displaying 
the logs).

Cheers

S. Ali Tokmen
savas-ali.tokmen@bull.net

Office: +33 4 76 29 76 19
GSM:    +33 66 43 00 555

Bull, Architect of an Open World TM
http://www.bull.com


On 15/09/2010 13:47, Claus Ibsen wrote:
> Hi
>
> Could you at least remember to state which version of Camel! And also
> did it work in a previous version? Have you tried with newer versions?
> And have you tried from an unit test outside any container (especially
> OSGi containers).
>
>
>
> On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
> <sa...@bull.net>  wrote:
>>   Hello
>>
>> The route I'm currently interested in uses CAMEL in Java DSL mode. It
>> basically copies files from an FTP server, hence the from clause:
>>
>>
>> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>>
>> As a result, the delay is supposed to be 60 seconds. But here's what I get
>> in the logs:
>>
>>    2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>>    logged in to: ftp://camel@production26:21:21
>>    2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>>    logged in to: ftp://camel@production26:21:21
>>    2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>>    logged in to: ftp://camel@production26:21:21
>>    2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>>    logged in to: ftp://camel@production26:21:21
>>
>> Which indicates that CAMEL about twice a second. After looking to it with a
>> debugger, I've seen that this delay comes from the default value of
>> ScheduledPollConsumer.delay (500).
>>
>> I therefore see that the "delay" attribute of the consumer is not changed no
>> matter what delay I put in my URL. Is this an expected behaviour?
>>
>> Cheers
>>
>> --
>>
>> S. Ali Tokmen
>> savas-ali.tokmen@bull.net
>>
>> Office: +33 4 76 29 76 19
>> GSM:    +33 66 43 00 555
>>
>> Bull, Architect of an Open World TM
>> http://www.bull.com
>>
>>
>
>


Re: The delay option seems not to be working in CAMEL Java DSL mode

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Could you at least remember to state which version of Camel! And also
did it work in a previous version? Have you tried with newer versions?
And have you tried from an unit test outside any container (especially
OSGi containers).



On Wed, Sep 15, 2010 at 11:58 AM, S. Ali Tokmen
<sa...@bull.net> wrote:
>  Hello
>
> The route I'm currently interested in uses CAMEL in Java DSL mode. It
> basically copies files from an FTP server, hence the from clause:
>
>
> ftp://camel@production26:21/ftproot/camel?password=camel&delay=60000&binary=true&disconnect=true
>
> As a result, the delay is supposed to be 60 seconds. But here's what I get
> in the logs:
>
>   2010-09-15 09:22:09,008 INFO (RemoteFileConsumer) - Connected and
>   logged in to: ftp://camel@production26:21:21
>   2010-09-15 09:22:09,508 INFO (RemoteFileConsumer) - Connected and
>   logged in to: ftp://camel@production26:21:21
>   2010-09-15 09:22:10,004 INFO (RemoteFileConsumer) - Connected and
>   logged in to: ftp://camel@production26:21:21
>   2010-09-15 09:22:10,714 INFO (RemoteFileConsumer) - Connected and
>   logged in to: ftp://camel@production26:21:21
>
> Which indicates that CAMEL about twice a second. After looking to it with a
> debugger, I've seen that this delay comes from the default value of
> ScheduledPollConsumer.delay (500).
>
> I therefore see that the "delay" attribute of the consumer is not changed no
> matter what delay I put in my URL. Is this an expected behaviour?
>
> Cheers
>
> --
>
> S. Ali Tokmen
> savas-ali.tokmen@bull.net
>
> Office: +33 4 76 29 76 19
> GSM:    +33 66 43 00 555
>
> Bull, Architect of an Open World TM
> http://www.bull.com
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus