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><compositeQueue/></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"><beans></SPAN>
+
+ <SPAN class="code-tag"><bean class=<SPAN
class="code-quote">"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"</SPAN>/></SPAN>
+
+ <SPAN class="code-tag"><broker xmlns=<SPAN
class="code-quote">"http://activemq.org/config/1.0"</SPAN>></SPAN>
+ <SPAN class="code-tag"><destinationInterceptors></SPAN>
+ <SPAN class="code-tag"><virtualDestinationInterceptor></SPAN>
+ <SPAN class="code-tag"><virtualDestinations></SPAN>
+ <SPAN class="code-tag"><compositeQueue name=<SPAN
class="code-quote">"MY.QUEUE"</SPAN>></SPAN>
+ <SPAN class="code-tag"><forwardTo></SPAN>
+ <SPAN class="code-tag"><queue physicalName=<SPAN
class="code-quote">"FOO"</SPAN>/></SPAN>
+ <SPAN class="code-tag"><topic physicalName=<SPAN
class="code-quote">"BAR"</SPAN>/></SPAN>
+ <SPAN class="code-tag"></forwardTo></SPAN>
+ <SPAN class="code-tag"></compositeQueue></SPAN>
+ <SPAN class="code-tag"></virtualDestinations></SPAN>
+ <SPAN class="code-tag"></virtualDestinationInterceptor></SPAN>
+ <SPAN class="code-tag"></destinationInterceptors></SPAN>
+
+ <SPAN class="code-tag"></broker></SPAN>
+
+<SPAN class="code-tag"></beans></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
- (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=9061&originalId=9296">view
change</A>)
+ (<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>