AMQP (Advanced Message Queuing Protocol) is an open protocol for fast asynchronous message between applications with minimal delay.
. Message brokers create a two-way connection with each system of applications. This connection is used to transmit message to the corresponding destination points.
AMQP is based on three concepts:
- a unit of transmitted data, its main part (content) is not interpreted by the server Structured headings be attached to a message.
- – a holding location where the messages are stored until a takes them. A consumer always takes the messages from one or several queues.
Process sequence
- All messages, generated by the producer, are first accepted in the exchange.
- Here they are distributed between the . Bindings are used to send messages to the esponding queues.
- Sent messages remain in their until the consumer connects and receives .
- The consumer receives the .
Conne to a queue
through the RabbitMQ broker, set up a queue in the system:
- Navigate to External Queues → RabbitMQ providers.
- Click New and fill in the required fields.
- Click Save or Save and Exit.
Field | Mandatory | Description |
---|
Name | Y | Specify a name for the newly message queue. This queue name will be used to send messages from the API. |
Host name | Y | bbitMQ host name to connect to |
Port | Y | Specify the server connection port. |
Virtual host | N | Specify the host designated in the RabbitMQ server settings. |
Connection time out | N | Set the RabbitMQ server connection time out. |
Username | Y | Specify a r login for the abbitMQ server connection. |
Password | Y | Specif a user password for the abbitMQ server connection. |
To send messages to a queue, using the SimpleExternalRabbitMQ class.