Some scattered knowledge points
Introduction
Amqp (Message Queue Protocol, Advanced Message Queuing Protocol) is a message protocol, equivalent to JMS, but JMS is only a Java platform solution, and amqp is a cross-language protocol.
Amqp, a language-independent platform, was initially developed from jpmorgon because of business needs and soon popularized from the financial sector to the entire computer industry.
Amqp is still a draft. The latest version is: 0.10.
Publisher ---> exchange ---> messagequeue ---> consumer
The entire process is asynchronous. publisher, and the consumer does not know each other's existence.
Exchange is responsible for switching/routing and relies on the routing key. Each message has a routing key.
Each binding informs exchange of the routingkey that you are interested in so that exchange can
The message is forwarded to the corresponding queue.
Several Concepts
Producer, routing key, exchange, binding, queue, consumer.
Producer: the creator of the message, the sender of the message.
Routing key: uniquely identifies the queue to which a message is mapped.
Exchange: Responsible for message routing and exchange
Binding: defines the queing between queue and exchange
Queue: Message Queue
Consumer: Message consumer
Exchange type
Fan-out: similar to broadcast mode, regardless of routingkey
Direct: associated Forwarding Based on the routingkey
Topic: similar to direct, but supports multiple key associations and is sent in a group.
The key defines the boundary. Similar to USEA. News, USEA. Weather. The two messages are in a group.
Qpid
Qpid is an implementation of amqp. It provides C ++ and Java brokers and supports clients in multiple languages.
The basic functions provide the following features:
Corosync (?) To ensure the fault-tolerant (?) in the cluster environment (?) Features
Supports XML exchange. When a message is XML, XQuery is used for filtering.
Support for plugin
Provides security authentication to authenticate producer/consumer.
Qpidd -- port -- no-data-dir -- auth
Port: Port
-- No-data-Dir: No data directory is specified.
-- Auth: do not enable security Identity Authentication
After startup, some exchange, Amp. Topic, Amp. Direct, and AMP. fanout are automatically created.
Tools:
Qpid-config: maintains queue, exchange, and internal configurations.
Qpid-route: Configure broker Federation? Cluster ?)
Qpid-tool: Monitoring