activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r426100 - /incubator/activemq/site/virtual-destinations.html
Date Thu, 27 Jul 2006 15:20:03 GMT
Author: chirino
Date: Thu Jul 27 08:20:02 2006
New Revision: 426100

Latest export from confluence


Modified: incubator/activemq/site/virtual-destinations.html
--- incubator/activemq/site/virtual-destinations.html (original)
+++ incubator/activemq/site/virtual-destinations.html Thu Jul 27 08:20:02 2006
@@ -330,7 +330,38 @@
 <P>Note that making a topic virtual does add a small CPU overhead when sending messages
to the topic but it is fairly small.</P>
+<H2><A name="VirtualDestinations-CompositeDestinations"></A>Composite Destinations</H2>
+<P>Composite Destinations allow for one-to-many relationships on individual destinations.
Its typically useful for <EM>composite queues</EM>. 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.</P>
+<P>The following <SPAN class="nobr"><A href=""
title="Visit page outside Confluence" rel="nofollow">example<SUP><IMG class="rendericon"
src="" height="0" width="0" align="absmiddle"
alt="" border="0"></SUP></A></SPAN> shows how to setup a <B>&lt;compositeQueue/&gt;</B>
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.</P>
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-xml"><SPAN class="code-tag">&lt;beans&gt;</SPAN>
+  <SPAN class="code-tag">&lt;bean class=<SPAN class="code-quote">&quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&quot;</SPAN>/&gt;</SPAN>
+  <SPAN class="code-tag">&lt;broker xmlns=<SPAN class="code-quote">&quot;;</SPAN>&gt;</SPAN>
+    <SPAN class="code-tag">&lt;destinationInterceptors&gt;</SPAN>
+      <SPAN class="code-tag">&lt;virtualDestinationInterceptor&gt;</SPAN>
+        <SPAN class="code-tag">&lt;virtualDestinations&gt;</SPAN>
+          <SPAN class="code-tag">&lt;compositeQueue name=<SPAN class="code-quote">&quot;MY.QUEUE&quot;</SPAN>&gt;</SPAN>
+            <SPAN class="code-tag">&lt;forwardTo&gt;</SPAN>
+              <SPAN class="code-tag">&lt;queue physicalName=<SPAN class="code-quote">&quot;FOO&quot;</SPAN>/&gt;</SPAN>
+              <SPAN class="code-tag">&lt;topic physicalName=<SPAN class="code-quote">&quot;BAR&quot;</SPAN>/&gt;</SPAN>
+            <SPAN class="code-tag">&lt;/forwardTo&gt;</SPAN>
+          <SPAN class="code-tag">&lt;/compositeQueue&gt;</SPAN>
+        <SPAN class="code-tag">&lt;/virtualDestinations&gt;</SPAN>
+      <SPAN class="code-tag">&lt;/virtualDestinationInterceptor&gt;</SPAN>
+      <SPAN class="code-tag">&lt;/destinationInterceptors&gt;</SPAN>
+  <SPAN class="code-tag">&lt;/broker&gt;</SPAN>
+<SPAN class="code-tag">&lt;/beans&gt;</SPAN></PRE>
+<P>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.</P></DIV>
@@ -341,7 +372,7 @@
     <DIV id="site-footer">
           Added by     <A href="">James
     last edited by     <A href="">James
Strachan</A> on Jul 27, 2006
-                  &nbsp;(<A href="">view
+                  &nbsp;(<A href="">view
       (<A href="">edit

View raw message