Boa tarde, Habr! Desejo compartilhar um livro de referência de livros didáticos que consegui coletar RabbitMQ
e compactar em breves recomendações e conclusões.
Índice
Brevemente sobre AMQP
O AMQP (Advanced Message Queuing Protocol) é um protocolo aberto para transferência de mensagens entre componentes do sistema. A idéia principal é que subsistemas individuais (ou aplicativos independentes) podem trocar mensagens de maneira arbitrária por meio de um broker AMQP que fornece roteamento, possivelmente garante entrega, distribuição de fluxos de dados e assinatura para os tipos necessários de mensagens.
O protocolo AMQP
apresenta três conceitos:
![rabbitmq_1](https://habrastorage.org/getpro/habr/post_images/6f4/7e9/2a8/6f47e92a8d4ebca0e828abd0970596e9.jpg)
exchange
( ) — . . (binding
)queue
() — , consumers
().binding
() — , .
TCP/IP.
Erlang
GitHub. RabbitMQ-server Erlang BEAM.
Erlang
Ericsson
1980-x , , , 99,999%. Erlang
, WhatsApp
. WhatsApp, Facebook $19
RabbitMQ
RabbitMQ – . AMQP . . RabbitMQ
AMQP
.
RabbitMQ
, producer
() . , - .
. , , — . , . ? ? .
![Imagem de: http://bit.ly/2U3PyJz](https://habrastorage.org/getpro/habr/post_images/1e8/006/fbb/1e8006fbb2212da5d284f246fa0f64bc.png)
RabbitMQ
:
- , ,
- .
- ,
- , , .
RPC
RPC (remote procedure call) RabbitMQ
. , RabbitMQ
, RPC
. , RabbitMQ
:
![rabbitmq_2](https://habrastorage.org/webt/e8/lr/jj/e8lrjjvfhlx_bnd4lusfntmukmo.jpeg)
AMQP
. , . — . , Connection.Start
– Start
Connection
.
. . . , .
. Erlang
. (multiplexing). . , RabbitMQ .
![rabbitmq_3](https://habrastorage.org/webt/iq/ne/q-/iqneq-_gmg-yq8bkk2-3_-mkvky.jpeg)
RabbitMQ.Client:
private void TryConnect()
{
var factory = new ConnectionFactory()
{
HostName = "host_name",
UserName = "user_name",
Password = "p@ssword",
AutomaticRecoveryEnabled = true
};
_connection = factory.CreateConnection();
}
public void CreateChannel()
{
_channel = _connection.CreateModel();
}
, , . , , , .
RabbitMQ?
AMQP
RabbitMQ
.
IIOT
AMQP
RabbitMQ
(-). MQTT Plugin RabbitMQ MQTT ( ).
Exchanges.