blob: d9489cc562af69dcb2cfc1e229ef9414d0b76243 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<link href="http://activemq.apache.org/styles/site.css" rel="stylesheet" type="text/css"/>
<link href="http://activemq.apache.org/styles/type-settings.css" rel="stylesheet" type="text/css"/>
<script src="http://activemq.apache.org/styles/prototype.js" type="text/javascript"></script>
<script src="http://activemq.apache.org/styles/rico.js" type="text/javascript"></script>
<script src="http://activemq.apache.org/styles/site.js" type="text/javascript"></script>
<style type="text/css">
.maincontent { overflow:hidden; }
</style>
<!--[if IE]>
<style type="text/css">
.maincontent { width:100%; }
</style>
<![endif]-->
<title>
Apache ActiveMQ &#8482; -- ActiveMQ Wildcards
</title>
</head>
<body>
<div class="white_box">
<div class="header">
<div class="header_l">
<div class="header_r">
</div>
</div>
</div>
<div class="content">
<div class="content_l">
<div class="content_r">
<div>
<!-- Banner -->
<div id="asf_logo">
<div id="activemq_logo">
<a shape="rect" style="float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;" href="">ActiveMQ</a>
<a shape="rect" style="float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;" href="http://www.apache.org">ASF</a>
</div>
</div>
<div class="top_red_bar">
<div id="site-breadcrumbs">
<a href="index.html">Index</a>&nbsp;&gt;&nbsp;<a href="apachenms.html">Apache.NMS</a>&nbsp;&gt;&nbsp;<a href="nms-providers.html">NMS Providers</a>&nbsp;&gt;&nbsp;<a href="apachenmsactivemq.html">Apache.NMS.ActiveMQ</a>&nbsp;&gt;&nbsp;<a href="activemq-advanced-features.html">ActiveMQ Advanced Features</a>&nbsp;&gt;&nbsp;<a href="activemq-destination-features.html">ActiveMQ Destination Features</a>&nbsp;&gt;&nbsp;<a href="activemq-wildcards.html">ActiveMQ Wildcards</a>
</div>
<div id="site-quicklinks">
<p><a shape="rect" href="download.html">Download</a> | <a shape="rect" href="nms-api.html">API</a> | <a shape="rect" href="source.html">Source</a> | <a shape="rect" class="external-link" href="http://activemq.apache.org/discussion-forums.html">Forums</a> | <a shape="rect" class="external-link" href="http://activemq.apache.org/support.html">Support</a></p>
</div>
</div>
<table border="0">
<tbody>
<tr>
<td valign="top" width="100%">
<div class="wiki-content maincontent">We support destination wildcards to provide easy support for federated name hierarchies. This concept has been popular in financial market data for some time as a way of organizing events (such as price changes) into hierarchies and to use wildcards for easy subscription of the range of information you're interested in.<p>For example imagine you are sending price messages from a stock exchange feed. You might use some kind of destination such as</p><ul><li><code>PRICE.STOCK.NASDAQ.ORCL</code> to publish Oracle Corporation's price on NASDAQ and</li><li><code>PRICE.STOCK.NYSE.IBM</code> to publish IBM's price on the New York Stock Exchange</li></ul><p>A subscriber could then use exact destinations to subscribe to exactly the prices it requires. Or it could use wildcards to define hierarchical pattern matches to the destinations to subscribe from.</p><h3 id="ActiveMQWildcards-Wildcardssupported">Wildcards supported</h3><p>We support the following wildcards which are fairly standard practice; wildcards are not part of the JMS specification so are custom enhancements.</p><ul><li><code>.</code> is used to separate names in a path</li><li><code>*</code> is used to match any name in a path</li><li><code>&gt;</code> is used to recursively match any destination starting from this name</li></ul><p>For example using the example above, these subscriptions are possible</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Subscription</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Meaning</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PRICE.&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any price for any product on any exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PRICE.STOCK.&gt;</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any price for a stock on any exchange</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PRICE.STOCK.NASDAQ.*</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any stock price on NASDAQ</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>PRICE.STOCK.*.IBM</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Any IBM stock price on any exchange</p></td></tr></tbody></table></div><p><strong>Note:</strong> Don't specify any string after '&gt;' on your wildcard expression, it will be ignored. E.g. using a wildcard <code>PRICE.&gt;.IBM</code> will also match <code>PRICE.STOCK.NASDAQ.FB.</code> Using '&gt;' really matches everything till the end of the destination name.</p><h3 id="ActiveMQWildcards-Custompathseparator">Custom path separator</h3><p>As of version 5.5.0 we support <a shape="rect" class="external-link" href="http://activemq.apache.org/interceptors.html">plugin</a> that allows clients to use customer path separator. So instead of</p><p><code>FOO.BAR.*</code></p><p>you can use</p><p><code>FOO/BAR/*</code></p><p>To</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;"> &lt;plugins&gt;
.....
&lt;destinationPathSeparatorPlugin/&gt;
&lt;/plugins&gt;
</pre>
</div></div><p>Please note that you should add this plugin as last if you want it to work properly with other plugins (such as <a shape="rect" class="external-link" href="http://activemq.apache.org/security.html">security</a> for example).</p><p>A default path separator this plugin will use is <code>/</code>. You can customize it further using <code>pathSeparator</code> property.</p></div>
</td>
<td valign="top">
<div class="navigation">
<div class="navigation_top">
<div class="navigation_bottom">
<h3 id="Navigation-Overviewhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45788"><a shape="rect" href="overview.html">Overview</a></h3>
<ul class="alternate"><li><a shape="rect" href="index.html">Home</a></li><li><a shape="rect" href="faq.html">FAQ</a></li><li><a shape="rect" href="download.html">Download</a></li></ul>
<h3 id="Navigation-UsingNMShttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=117579"><a shape="rect" href="using-nms.html">Using NMS</a></h3>
<ul class="alternate"><li><a shape="rect" href="apachenms.html">NMS Overview</a></li><li><a shape="rect" href="nms.html">Getting Started</a></li><li><a shape="rect" href="nms-api.html">NMS API Reference</a></li><li><a shape="rect" href="apachenmsactivemq.html">ActiveMQ</a></li><li><a shape="rect" href="apachenmsstomp.html">Stomp</a></li><li><a shape="rect" href="apachenmsmsmq.html">MSMQ</a></li><li><a shape="rect" href="apachenmsems.html">Tibco EMS</a></li><li><a shape="rect" href="apachenmswcf.html">WCF</a></li></ul>
<h3 id="Navigation-Search">Search</h3>
<p></p><p>
</p><form enctype="application/x-www-form-urlencoded" method="get" id="cse-search-box" action="http://www.google.com/cse">
<div>
<input type="hidden" name="cx" value="007878419884033443453:m5nhvy4hmyq">
<input type="hidden" name="ie" value="UTF-8">
<input type="text" name="q" size="21">
<input type="submit" name="sa" value="Search">
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>
<p></p>
<h3 id="Navigation-Communityhttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45789"><a shape="rect" href="community.html">Community</a></h3>
<ul class="alternate"><li><a shape="rect" href="support.html">Support</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/contributing.html">Contributing</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/discussion-forums.html">Discussion Forums</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/mailing-lists.html">Mailing Lists</a></li><li><a shape="rect" class="external-link" href="irc://irc.codehaus.org/activemq" rel="nofollow">IRC</a></li><li><a shape="rect" href="articles.html">Articles</a></li><li><a shape="rect" href="site.html">Site</a></li><li><a shape="rect" class="external-link" href="http://activemq.apache.org/team.html">Team</a></li></ul>
<h3 id="Navigation-Developershttps://cwiki.apache.org/confluence/pages/viewpage.action?pageId=45790"><a shape="rect" href="developers.html">Developers</a></h3>
<ul class="alternate"><li><a shape="rect" href="source.html">Source</a></li><li><a shape="rect" href="building.html">Building</a></li></ul>
</div>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<div class="bottom_red_bar"></div>
</div>
</div>
</div>
</div>
<div class="black_box">
<div class="footer">
<div class="footer_l">
<div class="footer_r">
<div>
<a href="http://activemq.apache.org/privacy-policy.html">Privacy Policy</a> -
(<a href="https://cwiki.apache.org/confluence/pages/editpage.action?pageId=25201944">edit this page</a>)
</div>
</div>
</div>
</div>
</div>
</div>
<div class="design_attribution">
&copy; 2004-2011 The Apache Software Foundation.
<br/>
Apache ActiveMQ, ActiveMQ, Apache, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
<br/>
<a href="http://hiramchirino.com">Graphic Design By Hiram</a>
</div>
<!-- delay the loading of large javascript files to the end so that they don't interfere with the loading of page content -->
<span style="display: none">
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-1347593-1");
pageTracker._initData();
pageTracker._trackPageview();
</script>
</span>
</body>
</html>