Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08388186D4 for ; Tue, 13 Oct 2015 13:36:57 +0000 (UTC) Received: (qmail 59558 invoked by uid 500); 13 Oct 2015 13:36:56 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 59514 invoked by uid 500); 13 Oct 2015 13:36:56 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 59503 invoked by uid 99); 13 Oct 2015 13:36:56 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Oct 2015 13:36:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A5AABC39D0 for ; Tue, 13 Oct 2015 13:36:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.473 X-Spam-Level: *** X-Spam-Status: No, score=3.473 tagged_above=-999 required=6.31 tests=[FORGED_HOTMAIL_RCVD2=1.187, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id sHGKdHIRClCm for ; Tue, 13 Oct 2015 13:36:49 +0000 (UTC) Received: from mbob.nabble.com (mbob.nabble.com [162.253.133.15]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTP id 80B6C2074F for ; Tue, 13 Oct 2015 13:36:49 +0000 (UTC) Received: from msam.nabble.com (unknown [162.253.133.85]) by mbob.nabble.com (Postfix) with ESMTP id 816D4178CF71 for ; Tue, 13 Oct 2015 06:28:46 -0700 (PDT) Date: Tue, 13 Oct 2015 06:36:49 -0700 (MST) From: dermoritz To: users@camel.apache.org Message-ID: <1444743409034-5772615.post@n5.nabble.com> Subject: How detect finish in Composed Message Processor EIP? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I have a route (triggered manually) that looks like this (pseudo code) from( trigger ) .routePolicy( new FinishNotifier( onFinsh ) ) .to( JDBCEndpoint ).split().body() .streaming() .process( setIdAndHeaderCount ) .aggregate( header( "id" ), packAggregator ) .completionSize( header( "count" ) ) .parallelProcessing() // breaks on done .process( validationProcessor ) .to( JDBCEndpoint ) Since this is not working - "parallelProcessing" breaks "onCompletion" (without parallelProcessing all works finr) (http://camel.465427.n5.nabble.com/When-original-exchange-quot-isDone-quot-with-aggregator-td5772577.html) Claus suggest "Composed Message Processor EIP" (thanks again). There are 2 ways suggested: "splitter only" but this way doesn't fit because i need the headers to be set and completionSize (putting all this logic into aggregator is too much at the moment). The second way suggests to decouple split and aggregate into 2 routes connected by a seda queue. *But how to detect that all work is done?* I need to now when the original exchange (a large iterator/resultSet) is completed and all processing steps are done. I am not sure if it is sufficient to detect that seda queue is empty for some time. Thanks in advance -- View this message in context: http://camel.465427.n5.nabble.com/How-detect-finish-in-Composed-Message-Processor-EIP-tp5772615.html Sent from the Camel - Users mailing list archive at Nabble.com.