Hello,

The manual commit needs to be done is the same thread of the kafka consumer, so 
you cannot do this in route 2 or route 3.

--
Andrea Cosentino 
----------------------------------
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: [email protected]
Twitter: @oscerd2
Github: oscerd






On Monday, June 21, 2021, 02:54:00 PM GMT+2, Vyacheslav Boyko 
<[email protected]> wrote: 





Hi!

It's the first time I use Kafka + Camel chain.
And... what if I have following routes:

// 1 route
from("kafka://my-topic?allowManualCommit=true&autoCommitEnable=false")
    .process(someProcessor)
    .choice()
        .when(simple("${body} == "MY-CONDITION")
            .to("seda://yes-queue")
        .otherwise()
            .to("seda://no-queue")
    .end();

// 2 route
from("seda://yes-route")
    .process(processorYes);

// 3 route
from("seda://no-route")
    .process(processorNo);

Am I right saying that all incoming messages will pass through 1 route
then 2 or 3 route (conditionally) and will park into processorYes or
processorNo. Am I able to perform commit Kafka message not only in 1
route? I mean, am I right that Camel will pass exactly one instance of
Exchange from route 1 to route 2 or 3 and I will be able to perform
Kafka commit in route 2? Or do Camel do something with Kafka fetching
makes me being not able to commit Kafka message in next (after Kafka
consuming) route?


-- 
Vyacheslav Boyko
aka bvn13
mailto:[email protected]

Reply via email to