Class TopicExchange

  • All Implemented Interfaces:
    Externalizable, Serializable, IExchangeMBean

    public class TopicExchange
    extends IExchange
    The topic exchange type works as follows:
    • 1. A message queue binds to the exchange using a routing pattern, P.
    • 2. A publisher sends the exchange a message with the routing key R.
    • 3. The message is passed to the message queue if R matches P.
    The routing key used for a topic exchange MUST consist of zero or more words delimited by dots. Each word may contain the letters A-Z and a-z and digits 0-9.
    The routing pattern follows the same rules as the routing key with the addition that * matches a single word, and # matches zero or more words. Thus the routing pattern *.stock.# matches the routing keys usd.stock and eur.stock.db but not stock.nasdaq.
    See Also:
    Serialized Form