Return-Path: Delivered-To: apmail-geronimo-activemq-commits-archive@www.apache.org Received: (qmail 36515 invoked from network); 27 Jul 2006 15:20:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Jul 2006 15:20:24 -0000 Received: (qmail 2280 invoked by uid 500); 27 Jul 2006 15:20:24 -0000 Delivered-To: apmail-geronimo-activemq-commits-archive@geronimo.apache.org Received: (qmail 2258 invoked by uid 500); 27 Jul 2006 15:20:24 -0000 Mailing-List: contact activemq-commits-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-dev@geronimo.apache.org Delivered-To: mailing list activemq-commits@geronimo.apache.org Received: (qmail 2249 invoked by uid 99); 27 Jul 2006 15:20:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 08:20:24 -0700 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [140.211.166.113] (HELO eris.apache.org) (140.211.166.113) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Jul 2006 08:20:23 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id B43B91A981A; Thu, 27 Jul 2006 08:20:03 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r426100 - /incubator/activemq/site/virtual-destinations.html Date: Thu, 27 Jul 2006 15:20:03 -0000 To: activemq-commits@geronimo.apache.org From: chirino@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20060727152003.B43B91A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: chirino Date: Thu Jul 27 08:20:02 2006 New Revision: 426100 URL: http://svn.apache.org/viewvc?rev=426100&view=rev Log: Latest export from confluence Modified: incubator/activemq/site/virtual-destinations.html Modified: incubator/activemq/site/virtual-destinations.html URL: http://svn.apache.org/viewvc/incubator/activemq/site/virtual-destinations.html?rev=426100&r1=426099&r2=426100&view=diff ============================================================================== --- incubator/activemq/site/virtual-destinations.html (original) +++ incubator/activemq/site/virtual-destinations.html Thu Jul 27 08:20:02 2006 @@ -330,7 +330,38 @@

Note that making a topic virtual does add a small CPU overhead when sending messages to the topic but it is fairly small.

- + +

Composite Destinations

+ +

Composite Destinations allow for one-to-many relationships on individual destinations. Its typically useful for composite queues. For example when a message is sent to queue A you may want to forward it also to queues B and C and topic D. Composite destinations are then a virtual destination which maps to a collection of other destinations.

+ +

The following example shows how to setup a <compositeQueue/> element in the XML configuration so that when a message is sent to MY.QUEUE then it is really forwarded to the physical queue FOO and the topic BAR.

+ +
+
<beans>
+
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+
+  <broker xmlns="http://activemq.org/config/1.0">
+    <destinationInterceptors>
+      <virtualDestinationInterceptor>
+        <virtualDestinations>
+          <compositeQueue name="MY.QUEUE">
+            <forwardTo>
+              <queue physicalName="FOO"/>
+              <topic physicalName="BAR"/>
+            </forwardTo>
+          </compositeQueue>
+        </virtualDestinations>
+      </virtualDestinationInterceptor>
+      </destinationInterceptors>
+
+  </broker>
+
+</beans>
+
+ +

You can use this technique for example to be able to watch a queue, by sending messages sent to a queue to a notification topic.

@@ -341,7 +372,7 @@