activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
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

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 @@
 </DIV></DIV>
 
 <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>
-</DIV>
+
+<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="http://svn.apache.org/repos/asf/incubator/activemq/trunk/activemq-core/src/test/resources/org/apache/activemq/broker/virtual/composite-queue.xml"
title="Visit page outside Confluence" rel="nofollow">example<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" 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;http://activemq.org/config/1.0&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>
+</DIV></DIV>
+
+<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>
           
                   </DIV>
         </TD>
@@ -341,7 +372,7 @@
     <DIV id="site-footer">
           Added by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
     last edited by     <A href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on Jul 27, 2006
-                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=9061&originalId=9296">view
change</A>)
+                  &nbsp;(<A href="http://goopen.org/confluence/pages/diffpages.action?pageId=9061&originalId=9297">view
change</A>)
               
       (<A href="http://goopen.org/confluence/pages/editpage.action?pageId=9061">edit
page</A>)
     </DIV>



Mime
View raw message