Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 59229 invoked from network); 11 May 2010 09:06:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 May 2010 09:06:50 -0000 Received: (qmail 88142 invoked by uid 500); 11 May 2010 09:06:50 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 88097 invoked by uid 500); 11 May 2010 09:06:50 -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 88089 invoked by uid 99); 11 May 2010 09:06:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 May 2010 09:06:50 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of claus.ibsen@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-wy0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 May 2010 09:06:45 +0000 Received: by wyf28 with SMTP id 28so1921226wyf.32 for ; Tue, 11 May 2010 02:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=1BXtdTzMI7E8VOhGgL5rss04btohuyiuzh5lpBqUqMI=; b=mzyEBCU2GciVQwl0REIWaRJVp6oV9mUfzZt7QCbNstUn27lgK37ZpjAVPQkcGVuvCs 2eq85ZCc4LSGkdlM6LNQaZ3/7kYRq8JTxfsPA6IjUV8MYjKq23/T2i1hVuvvLRuvb0ci 94xCs+K8Y4EQP/oIcvyUbMZDsnQCnFNaTTNRk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=b25egVQBPeR8KbHXsclC7VwXcuCW/+G4eTb/rw35/KKSmD/xT2zhPHg9nJa6VqCxoH HVEygKI0DxPmBQKLcogcVHjRfE27I/RUM88YJT0sikHMEPu8pBWXuOuE7/r4NIiC2J1F ywsTd58uQ1atoJp0EW31Hs3QzaMOmQcEKbHe8= Received: by 10.216.86.136 with SMTP id w8mr859375wee.126.1273568784151; Tue, 11 May 2010 02:06:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.6.140 with HTTP; Tue, 11 May 2010 02:06:04 -0700 (PDT) In-Reply-To: <28521662.post@talk.nabble.com> References: <28444254.post@talk.nabble.com> <4BE0099D.20509@gmail.com> <28521662.post@talk.nabble.com> From: Claus Ibsen Date: Tue, 11 May 2010 11:06:04 +0200 Message-ID: Subject: Re: Recipient List with optional destinations. To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 On Tue, May 11, 2010 at 11:03 AM, Eric Bouer wrote: > > Hi. > You're right about that, I added errorhandler that just suppressed the > warrning. > But throwing an exception (filling all the stack trace) is a CPU intensive > task, rather than just skipping and moving on to the next recipient. > Would it be appropriate to open a JIRA for that? Yeah fell free to create a JIRA ticket with a new option to ignoreInvalidEndpoints=true And patch + unit test is of course always welcome :) > Thanks. > > > > willem.jiang wrote: >> >> How about the ErrorHandler[1]? you can use OnException[2] to check this >> kind of NoSuchEndpointException, and skip the route part. >> >> [1]http://camel.apache.org/error-handler.html >> [2]http://camel.apache.org/exception-clause.html >> >> Willem >> Eric Bouer wrote: >>> Hello. >>> I have a situation where I need to use dynamic router that should route >>> the >>> messages to endpoints that may or may be not exist. The problem is that >>> camel will throw a NoSuchEndpointException since it's trying to resolve >>> that >>> destination name. I would like it just to skip that endpoint and move on >>> to >>> the next endpoint. I'll demonstrate My case. >>> >>> My route looks like this: >>> from("direct:in").recipientList(header("mailboxes"), ":"); >>> A NoSuchEndpointException is raised when I get a header that contains a >>> mailbox name that does not exists. >>> Looking at http://camel.apache.org/recipient-list.html it seems that it's >>> possible to define a method call but is there a more elegant way I can >>> tell >>> camel to skip that destination if it does not exits? >> >> >> > > -- > View this message in context: http://old.nabble.com/Recipient-List-with-optional-destinations.-tp28444254p28521662.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus