38 lines
2.8 KiB
XML
38 lines
2.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
||
<!-- ============================================================================= -->
|
||
<!-- Copyright © 2009 Red Hat, Inc. and others. -->
|
||
<!-- -->
|
||
<!-- The text of and illustrations in this document are licensed by Red Hat under -->
|
||
<!-- a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). -->
|
||
<!-- -->
|
||
<!-- An explanation of CC-BY-SA is available at -->
|
||
<!-- -->
|
||
<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
|
||
<!-- -->
|
||
<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
|
||
<!-- of it, you must provide the URL for the original version. -->
|
||
<!-- -->
|
||
<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
|
||
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
|
||
<!-- permitted by applicable law. -->
|
||
<!-- ============================================================================= -->
|
||
|
||
<chapter id="wildcard-syntax">
|
||
<title>了解 ActiveMQ 通配符的语法</title>
|
||
<para>ActiveMQ使用了一种专门的通配符语法来配置安全、地址及接收者(consumer)的创建。</para>
|
||
<para>这种语法与 <ulink url="http://www.amqp.org">AMQP</ulink>所用的语法相似。</para>
|
||
<para>一个ActiveMQ的通配符表达式是由一些由“<literal
|
||
>.</literal>”分隔的单词组成。</para>
|
||
<para>特殊字符“<literal>#</literal>”和“<literal>*</literal>”在表达式中可作为一个单词,它们代表
|
||
特殊的意义。</para>
|
||
<para>字符“<literal>#</literal>”表示“零或多个单词的任意排列”。</para>
|
||
<para>字符“<literal>*</literal>”表示“一个单词”。</para>
|
||
<para>因此,通配符表达式“news.europe.#”可以匹配“news.europe”、“news.europe.sport”、
|
||
“news.europe.politics”以及“news.europe.politics.regional”,但是与“news.usa”、
|
||
“news.usa.sport” 及 “entertainment”不相匹配。</para>
|
||
<para>通配符“news.*”与“news.europe”匹配,但不与“news.europe.sport”匹配。</para>
|
||
<para>通配符“news.*.sport”与“news.europe.sport”及“news.usa.sport”匹配,但与
|
||
“news.europe.politics”不匹配。</para>
|
||
</chapter>
|