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 CAE1A9042 for ; Tue, 12 Jun 2012 10:41:51 +0000 (UTC) Received: (qmail 34212 invoked by uid 500); 12 Jun 2012 10:41:51 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 34165 invoked by uid 500); 12 Jun 2012 10:41:51 -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 34140 invoked by uid 99); 12 Jun 2012 10:41:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 10:41:50 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 209.85.215.45 as permitted sender) Received: from [209.85.215.45] (HELO mail-lpp01m010-f45.google.com) (209.85.215.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Jun 2012 10:41:46 +0000 Received: by lahc1 with SMTP id c1so4107428lah.32 for ; Tue, 12 Jun 2012 03:41:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=qMDGV2K2DBaN9Bf6xvNcvzc3wxSX72aSE3RasNV+4yM=; b=ZLzhSElz6e/u9rbGiOGhQAkEgDge/yh+HEVnT1zbF2S6ZZUQUEx9MUmOM0RbIv1z/D tyx+7U/7HqTm2bsLIWpBsqTS+9yHqRnE2i+Qvt8G6mObzchHL/ao6yHwQgYMJTGR19zO DEIbcOLpHX8OPYYia+HWCLusVNe05So5N9/f7hy9Lhod/4JM5X/ck5usvNHEJhvsfB+d t09ZzGacuPX99YFTdKgAQ1JTnzyoFY2da5H30uQHAMKbV4iwJU2xXaj1BnHHWRvz6bE0 LlOd4QHR4m0DcIh9u8wtiqAR7U/QBYfLQxhGMo7AXvUXcVAkaeOk9CSPhV3Sve3JZZe6 SBDQ== Received: by 10.152.108.178 with SMTP id hl18mr20267340lab.11.1339497685040; Tue, 12 Jun 2012 03:41:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.49.73 with HTTP; Tue, 12 Jun 2012 03:41:04 -0700 (PDT) In-Reply-To: <1339496303501-5714340.post@n5.nabble.com> References: <1336050743758-5683138.post@n5.nabble.com> <1339164802844-5714209.post@n5.nabble.com> <1339496303501-5714340.post@n5.nabble.com> From: Claus Ibsen Date: Tue, 12 Jun 2012 12:41:04 +0200 Message-ID: Subject: Re: No hit during Multicast To: users@camel.apache.org Content-Type: multipart/alternative; boundary=bcaec54c513ab1bd6b04c2441b21 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec54c513ab1bd6b04c2441b21 Content-Type: text/plain; charset=ISO-8859-1 On Tue, Jun 12, 2012 at 12:18 PM, kenhans wrote: > yes, I see that my description of the filter is lacking. It's actually a > loop > like this, where the producers contain filter-methods: > > MulticastDefinition multicastDefinition = route.multicast().onPrepare(new > DocumentDeepClone()); > for (Producer producer : producers) { > multicastDefinition > .filter().method(producer, "filter") > .bean(producer, "createEvent") > .to(EndPointUri.INCOMING_EVENT_QUEUE); > } > > so my problem is that the Exchange is not forwarded to the destination > (.bean...) if the filter Predicate of all Producers are false. And I do not > know how to handle that case. I do not seem to have any handle to the > Exchange after all predicates are false. How would the AggregationStrategy > help me here? I just want to discover the special case when all filter > predicates of the producers are false > > You can set a special header in the .bean, and detect if that header is absent in your aggregation strategy. Then you know all the filters was false. Another way is that Camel sets the http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html#TO_ENDPOINT header when you send a message to a destination using .to and some of the other EIPs. So if that header has not changed then all your filters is also false. > > -- > View this message in context: > http://camel.465427.n5.nabble.com/No-hit-during-Multicast-tp5683138p5714340.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 --bcaec54c513ab1bd6b04c2441b21--