FAQ
Hello everyone

I'm trying to get asynchronous processing in my component and got some
difficulties, I followed the tutorial on
http://camel.apache.org/asynchronous-processing.html.

In my test
from(myprotocl:endpoint).to(myprotocol:endpoint?exchangePattern=InOut)

the asynchronous process method is loaded but the consumer receives the
exchange without the producer modifications unless I wait a little bit after
the processor.process call (in the consumer).

Do I need to wait on some exchange modification? (As I do not get the
AsynchCallback in the consumer)?

Any help would be really welcome!

Thanks

Christophe

--
View this message in context: http://camel.465427.n5.nabble.com/InOut-with-asyncProcessor-seems-not-to-wait-for-completion-tp5521960p5521960.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Search Discussions

  • Claus Ibsen at Feb 28, 2012 at 3:22 pm
    Hi

    You need to use the async routing in the consumer to kick off this.

    Something along the lines of to have your consumer support the async
    routing engine.
    And in the done method you can do any done work in your consumer if
    you need that.

    AsyncProcessorHelper.process(processor, exchange, new
    AsyncCallback() {
    public void done(boolean doneSync) {
    // noop
    }
    });


    Alternatively if you extend DefaultConsumer, you can do

    getAsyncProcessor().process(exchange, new AsyncCallback() {
    public void done(boolean doneSync) {
    // noop
    }
    });

    On Tue, Feb 28, 2012 at 3:23 PM, Babel wrote:
    Hello everyone

    I'm trying to get asynchronous processing in my component and got some
    difficulties, I followed the tutorial on
    http://camel.apache.org/asynchronous-processing.html.

    In my test
    from(myprotocl:endpoint).to(myprotocol:endpoint?exchangePattern=InOut)

    the asynchronous process method is loaded but the consumer receives the
    exchange without the producer modifications unless I wait a little bit after
    the processor.process call (in the consumer).

    Do I need to wait on some exchange modification? (As I do not get the
    AsynchCallback in the consumer)?

    Any help would be really welcome!

    Thanks

    Christophe

    --
    View this message in context: http://camel.465427.n5.nabble.com/InOut-with-asyncProcessor-seems-not-to-wait-for-completion-tp5521960p5521960.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.blogspot.com/
    Author of Camel in Action: http://www.manning.com/ibsen/
  • Babel at Feb 29, 2012 at 2:29 pm
    a Huge thanks for that point which solved my problem!
    Best regards

    Christophe

    --
    View this message in context: http://camel.465427.n5.nabble.com/InOut-with-asyncProcessor-seems-not-to-wait-for-completion-tp5521960p5525058.html
    Sent from the Camel - Users mailing list archive at Nabble.com.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupusers @
categoriescamel
postedFeb 28, '12 at 2:24p
activeFeb 29, '12 at 2:29p
posts3
users2
websitecamel.apache.org

2 users in discussion

Babel: 2 posts Claus Ibsen: 1 post

People

Translate

site design / logo © 2022 Grokbase