com.supermap.messagequeue

Class AMQPExchangeType



  • public final class AMQPExchangeType
    extends Enum
    AMQP switch class

    Defines the type constant

    • Field Detail

      • DIRECT

        public static final AMQPExchangeType DIRECT
        Forward the message to the queue specified in routingKey

        It requests that the bindingKey when binding the queue should be consistent with bindingKey when sending. Ensure that only key matching the queue can send and receive messages

      • FANOUT

        public static final AMQPExchangeType FANOUT
        Forward the message to the queue binded with the switch routingKey

        If the receiver and sender use the same switch, all ports can receive and send messages

      • TOPIC

        public static final AMQPExchangeType TOPIC
        Forward the message to all queues that concern routingkey in the specified topuc.

        As long as the theme (bindingkey) concerned by the queue fuzzy matches with routingkey, it can send the message to this queue.

        The provided themes when binging with the queue can be represented by "*" and "#". "*" means a keyword and "#" means 0 or more keywords.

        Keywords are separated by the ".". For example, there are routingkey:"log","log.out","log.a.bug"; the "log.*" of bindingKey only receive "log.out" message, but the "log.#"of bindingKey can receive the front three messages.