FAQ
Within the file2 component, noop=true specifies that idempotent=true will
be set automatically. However, based upon a user initiated action I need
to poll a directory endpoint and obtain a list of files present. The
auto-set of idempotent=true creates problems as I'm not always able to read
the directory.

Camel orders parameters alphabetically during it's uri parameter
normalization I believe. This creates problems if I specify both
noop=false & idempotent=true (idempotent being set first and overriden by
noop).

My only thought now is to grab the File / Ftp endpoint manually via the
camel context and call the idempotent setter directly rather than by using
a parameter but for consistency, I'd prefer to stay with the string uri's.

Suggestions?

--
-------------------------------------------
Craig Taylor
ctalkobt@ctalkobt.net

Search Discussions

  • Claus Ibsen at Mar 14, 2012 at 8:37 am

    On Tue, Mar 13, 2012 at 10:08 PM, Craig Taylor wrote:
    Within the file2 component, noop=true specifies that idempotent=true will
    be set automatically.   However, based upon a user initiated action I need
    to poll a directory endpoint and obtain a list of files present.   The
    auto-set of idempotent=true creates problems as I'm not always able to read
    the directory.

    Camel orders parameters alphabetically during it's uri parameter
    normalization I believe.   This creates problems if I specify both
    noop=false & idempotent=true (idempotent being set first and overriden by
    noop).
    That should not be a problem. You should be able to specify both
    parameters in the uri.
    Its the FileEndpoint in its createConsumer method that checks these
    options whether they have been set or not etc.

    My only thought now is to grab the File / Ftp endpoint manually via the
    camel context and call the idempotent setter directly rather than by using
    a parameter but for consistency, I'd prefer to stay with the string uri's.

    Suggestions?

    --
    -------------------------------------------
    Craig Taylor
    ctalkobt@ctalkobt.net


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Craig Taylor at Mar 14, 2012 at 2:57 pm
    Once I deep-dived in the code I realized that ...

    However.. that still blocks the ability to have a noop consumer that is non
    idempotent for this use case.

    I'll attempt to use an always false filter and gather the file list there.
    On Wed, Mar 14, 2012 at 4:36 AM, Claus Ibsen wrote:
    On Tue, Mar 13, 2012 at 10:08 PM, Craig Taylor wrote:
    Within the file2 component, noop=true specifies that idempotent=true will
    be set automatically. However, based upon a user initiated action I need
    to poll a directory endpoint and obtain a list of files present. The
    auto-set of idempotent=true creates problems as I'm not always able to read
    the directory.

    Camel orders parameters alphabetically during it's uri parameter
    normalization I believe. This creates problems if I specify both
    noop=false & idempotent=true (idempotent being set first and overriden by
    noop).
    That should not be a problem. You should be able to specify both
    parameters in the uri.
    Its the FileEndpoint in its createConsumer method that checks these
    options whether they have been set or not etc.

    My only thought now is to grab the File / Ftp endpoint manually via the
    camel context and call the idempotent setter directly rather than by using
    a parameter but for consistency, I'd prefer to stay with the string uri's.
    Suggestions?

    --
    -------------------------------------------
    Craig Taylor
    ctalkobt@ctalkobt.net


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    -------------------------------------------
    Craig Taylor
    ctalkobt@ctalkobt.net
  • Claus Ibsen at Mar 14, 2012 at 3:03 pm

    On Wed, Mar 14, 2012 at 3:57 PM, Craig Taylor wrote:
    Once I deep-dived in the code I realized that ...

    However.. that still blocks the ability to have a noop consumer that is non
    idempotent for this use case.

    I'll attempt to use an always false filter and gather the file list there.
    Yeah using a filter is a good solution.
    Then you can pre-load / initialize the filer, with the pre existing
    files and whatnot.

    On Wed, Mar 14, 2012 at 4:36 AM, Claus Ibsen wrote:

    On Tue, Mar 13, 2012 at 10:08 PM, Craig Taylor <ctalkobt@ctalkobt.net>
    wrote:
    Within the file2 component, noop=true specifies that idempotent=true will
    be set automatically.   However, based upon a user initiated action I need
    to poll a directory endpoint and obtain a list of files present.   The
    auto-set of idempotent=true creates problems as I'm not always able to read
    the directory.

    Camel orders parameters alphabetically during it's uri parameter
    normalization I believe.   This creates problems if I specify both
    noop=false & idempotent=true (idempotent being set first and overriden by
    noop).
    That should not be a problem. You should be able to specify both
    parameters in the uri.
    Its the FileEndpoint in its createConsumer method that checks these
    options whether they have been set or not etc.

    My only thought now is to grab the File / Ftp endpoint manually via the
    camel context and call the idempotent setter directly rather than by using
    a parameter but for consistency, I'd prefer to stay with the string uri's.
    Suggestions?

    --
    -------------------------------------------
    Craig Taylor
    ctalkobt@ctalkobt.net


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/


    --
    -------------------------------------------
    Craig Taylor
    ctalkobt@ctalkobt.net


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedMar 13, '12 at 9:08p
activeMar 14, '12 at 3:03p
posts4
users2
websitecamel.apache.org

2 users in discussion

Claus Ibsen: 2 posts Craig Taylor: 2 posts

People

Translate

site design / logo © 2022 Grokbase