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.

我们支持目标通配符,以便为联邦名称层次结构提供简单的支持。这一概念在金融市场数据中已经流行了一段时间,作为一种将事件(比如价格变化)组织到层次结构中的方法,并使用通配符来轻松订阅您感兴趣的信息范围。

For example imagine you are sending price messages from a stock exchange feed. You might use some kind of destination such as

例如,假设您正在从一个股票交换提要发送价格消息。你可能会使用一些目的地,比如。

  • PRICE.STOCK.NASDAQ.ORCL to publish Oracle Corporation's price on NASDAQ and
  • PRICE.STOCK.NASDAQ。ORCL在纳斯达克发布甲骨文公司的价格。
  • PRICE.STOCK.NYSE.IBM to publish IBM's price on the New York Stock Exchange
  • PRICE.STOCK.NYSE。IBM在纽约证券交易所发布IBM的价格。

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.

然后,订阅者可以使用精确的目的地订阅所需的价格。或者,它可以使用通配符定义层次模式匹配到要订阅的目的地。

Wildcards supported

支持通配符

We support the following wildcards which are fairly standard practice; wildcards are not part of the JMS specification so are custom enhancements.

我们支持以下的通配符,这是相当标准的做法;通配符不是JMS规范的一部分,因此是自定义增强。

  • . is used to separate names in a path
  • 。用于在路径中分隔名称?
  • * is used to match any name in a path
  • *用于匹配路径中的任何名称。
  • > is used to recursively match any destination starting from this name
  • >用于递归地匹配从这个名称开始的任何目标。

For example using the example above, these subscriptions are possible

例如,使用上面的例子,这些订阅是可能的。

Subscription

订阅

Meaning

意义

PRICE.>

价格。>

Any price for any product on any exchange

任何产品在任何交易所的价格。

PRICE.STOCK.>

PRICE.STOCK。>

Any price for a stock on any exchange

任何股票在任何交易所的价格。

PRICE.STOCK.NASDAQ.*

PRICE.STOCK.NASDAQ。*

Any stock price on NASDAQ

纳斯达克的任何股票价格。

PRICE.STOCK.*.IBM

PRICE.STOCK * ibm。

Any IBM stock price on any exchange

任何IBM股票价格在任何交易所。

Note: Don't specify any string after '>' on your wildcard expression, it will be ignored. E.g. using a wildcard PRICE.>.IBM will also match PRICE.STOCK.NASDAQ.FB. Using '>' really matches everything till the end of the destination name.

注意:不要在通配符表达式上指定“>”之后的任何字符串,它将被忽略。使用通配符价格。>。IBM也将在纳斯达克(nasdaq)上市。使用“>”实际上匹配所有的内容,直到目标名称的末尾。

Custom path separator

自定义路径分隔符

As of version 5.5.0 we support plugin that allows clients to use customer path separator. So instead of

在5.5.0版本中,我们支持允许客户端使用客户路径分隔符的插件。而不是

FOO.BAR.*

FOO.BAR。*

you can use

您可以使用

FOO/BAR/*

FOO / BAR / *

To

    <plugins>
       .....
       <destinationPathSeparatorPlugin/>
    </plugins>

Please note that you should add this plugin as last if you want it to work properly with other plugins (such as security for example).

请注意,如果您希望它与其他插件(例如安全性)正常工作,您应该将这个插件添加到最后。

A default path separator this plugin will use is /. You can customize it further using pathSeparator property.

这个插件将使用的默认路径分隔符是/。您可以使用pathSeparator属性进一步定制它。

© 2004-2011 The Apache Software Foundation.
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.
Graphic Design By Hiram