Grokbase Groups Camel users July 2012
FAQ
Hi, from http://camel.apache.org/seda.html, we can use DSL to add thread pool
to SEDA, e.g. from("seda:stageName").thread(5).process(...),
can anyone tell me how to do the same thing using xml?
I have a xml seda route definition.
<camel:from uri="seda:asyncAuthenticate" />
<camel:to uri="bean:authenticateBean?method=performIndempotentOperations" />

Thanks a lot.
Billy



--
View this message in context: http://camel.465427.n5.nabble.com/Add-thread-pool-configuration-for-SEDA-using-xml-tp5716324.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Claus Ibsen at Jul 23, 2012 at 6:12 am

    On Mon, Jul 23, 2012 at 2:54 AM, billy ding wrote:
    Hi, from http://camel.apache.org/seda.html, we can use DSL to add thread pool
    to SEDA, e.g. from("seda:stageName").thread(5).process(...),
    This is not really possible. Please read the docs again.
    The seda has its own internal fixed thread pool, you cannot
    re-configure. You set the option concurrentConsumers=5 on the seda uri
    to indicate 5 threads.

    to SEDA, e.g. from("seda:stageName?concurrentConsumers=5").process(...),

    can anyone tell me how to do the same thing using xml?
    I have a xml seda route definition.
    <camel:from uri="seda:asyncAuthenticate" />
    <camel:to uri="bean:authenticateBean?method=performIndempotentOperations" />

    Thanks a lot.
    Billy



    --
    View this message in context: http://camel.465427.n5.nabble.com/Add-thread-pool-configuration-for-SEDA-using-xml-tp5716324.html
    Sent from the Camel - Users mailing list archive at Nabble.com.


    --
    Claus Ibsen
    -----------------
    FuseSource
    Email: cibsen@fusesource.com
    Web: http://fusesource.com
    Twitter: davsclaus, fusenews
    Blog: http://davsclaus.com
    Author of Camel in Action: http://www.manning.com/ibsen
  • Billy ding at Jul 26, 2012 at 3:15 am
    Hi Claus,

    Thanks for your reply.

    So can we conclude, if we use xml configuration for seda, we can't have a
    thread pool which can increase/shrink dynamically at runtime, is that right?

    Thanks.
    Billy



    --
    View this message in context: http://camel.465427.n5.nabble.com/Add-thread-pool-configuration-for-SEDA-using-xml-tp5716324p5716494.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Willem Jiang at Jul 26, 2012 at 1:34 pm
    Once you specify the seda endpoint with the URI, you cannot change the setting.

    If you want to change the endpoint setting of route dynamically, you
    need to stop the route first and add a new route with the new
    configuration then.
    On Thu, Jul 26, 2012 at 9:01 AM, billy ding wrote:
    Hi Claus,

    Thanks for your reply.

    So can we conclude, if we use xml configuration for seda, we can't have a
    thread pool which can increase/shrink dynamically at runtime, is that right?

    Thanks.
    Billy



    --
    View this message in context: http://camel.465427.n5.nabble.com/Add-thread-pool-configuration-for-SEDA-using-xml-tp5716324p5716494.html
    Sent from the Camel - Users mailing list archive at Nabble.com.
  • Billy ding at Jul 27, 2012 at 12:36 am
    Hi William,

    Thanks for your reply.

    Maybe I didn't describe my question clearly.
    From seda spec, it says "As for the difference between the two (Concurrent
    consumers and thread pool), note a thread pool can increase/shrink
    dynamically at runtime depending on load, whereas the number of concurrent
    consumers is always fixed."
    and we can use "from("seda:stageName").thread(5).process(...)" to configure
    the thread pool for seda via DSL, so I think using DSL can make seda threads
    number increase/shrink dynamically, which means it doesn't have to always be
    5 concurrent consumers.
    However, if you use xml, I only we can configure concurrentConsumers which
    has fixed number threads (e.g. always 5 concurrent consumers), but I don't
    know how to make the same effect using xml as DSL
    "from("seda:stageName").thread(5).process(...)". Can someone shed some light
    on this?



    --
    View this message in context: http://camel.465427.n5.nabble.com/Add-thread-pool-configuration-for-SEDA-using-xml-tp5716324p5716536.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedJul 23, '12 at 6:06a
activeJul 27, '12 at 12:36a
posts5
users3
websitecamel.apache.org

People

Translate

site design / logo © 2022 Grokbase