RabbitMQ
MQ, known as the message queue, is a communication method for distributed applications, a typical representation of the consumer-producer model, where producer writes messages to the message queue, while the other end consumer can read or subscribe to messages in the queue. RABBITMQ is a typical representation of MQ products and is a reusable enterprise messaging system based on the AMQP protocol. In the business, data decoupling between service provider and consumer can be realized, which provides high availability of message transmission mechanism, which is widely used in actual production. This article is intended to introduce the fundamentals of RABBITMQ and the various applications under Python.
The queue concept in Python:
- Thread queue: Only used for synchronization of data between multiple threads.
- Process queue: Only the user parent process interacts with the child process, or multiple child processes under the same parent process interact.
First, installation: Two, the basic example:
"Python"--RabbitMQ