Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 50551 invoked from network); 1 Oct 2008 16:02:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2008 16:02:54 -0000 Received: (qmail 26984 invoked by uid 500); 1 Oct 2008 16:02:52 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 26962 invoked by uid 500); 1 Oct 2008 16:02:52 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 26917 invoked by uid 99); 1 Oct 2008 16:02:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 09:02:52 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 209.85.217.15 as permitted sender) Received: from [209.85.217.15] (HELO mail-gx0-f15.google.com) (209.85.217.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 16:01:50 +0000 Received: by gxk8 with SMTP id 8so310268gxk.14 for ; Wed, 01 Oct 2008 09:02:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=REODt/eX6D7byi1VVIjkzuNm+u0Zuj5nKlJUCft3lqI=; b=RT6SUHk/f/wkBo2Vyl0uh3qRU7XuVw0G2a2BFVUsSyn9dQXRQkXoLD5V2gGMQ8+rj2 YWTqLG4Ff1drpKEVwuiemY6ByVtQsxnXfAPpNALJTSgJw+Cg688IVpiIuA5GGpPKGqFv QSrrWfiDsCk3Vnb8pWx314qIEZdsocOjDyhYk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=SCJxeYFILQjZw/kyxhT8WOxFNqLCIbPyLN5Zg9rueya2+LOQ7sD6Gej9VGRuaT4twP cgSUr3LUIUvUZXgi+v3jbnAVIoFwF4fnyU/8vQZHmyGdIhuahYTN7UdoyCNDLmftK3Gq yf3LER6WGOoiH3sKlJD/3rj3L7gzV9GJPoig0= Received: by 10.90.97.18 with SMTP id u18mr9175463agb.82.1222876942953; Wed, 01 Oct 2008 09:02:22 -0700 (PDT) Received: by 10.90.117.12 with HTTP; Wed, 1 Oct 2008 09:02:22 -0700 (PDT) Message-ID: Date: Wed, 1 Oct 2008 17:02:22 +0100 From: "James Strachan" To: camel-dev@activemq.apache.org Subject: [HeadsUp] implementing Dynamic Recipient Lists using annotations MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org I've just added support for @RecipientList annotation on a bean method to implement a dynamic recipient list. This can be used when using @MesageDriven or @Consume to call the method when messages arrive, or if the bean method is explicitly invoked from a route. e.g. public class RouterBean { @MessageDriven(uri = "activemq:foo") @RecipientList public String[] route(String body) { return new String[]{"activemq:bar", "activemq:whatnot"}; } } you can return a single Endpoint or object that can be converted into a String; or a collection or array of such objects. More documentation is here... http://cwiki.apache.org/CAMEL/recipientlist-annotation.html As usual feedback welcome! -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://open.iona.com