filmov
tv
RABBITMQ UNDERSTANDING MESSAGE BROKER

Показать описание
RabbitMQ is a message-queueing software also known as a message broker or queue manager. Simply said; it is software where queues are defined, to which applications connect in order to transfer a message or messages.
A message broker acts as an intermediary platform when it comes to processing communication between two applications. RabbitMQ is one such open-source enterprise messaging system modeled on the Advanced Message Queuing Protocol (AMQP) standard. In this blog post, I will describe a scenario that led us to get to the bottom of a development problem and understand the real need behind using such a service.
```
public void RegisterUser(User user)
{
//Register user
userService.Register(user);
//Send welcome email
emailService.SendWelcomeEmail(user)
//Call third party api for affiliate tracking
//audit log
}
```
A new registration module went live and did work like a charm initially. One of the early problems we encountered was that the registration module showed an error once a user finished the registration process. Subsequent investigations revealed that the third-party SMTP APIs were down for some time. It was during this downtime that a user registered but never received confirmation emails.
Keeping the above in mind, we also had to take into account the following scenarios:
– Third-party API stops working
– Audit log table gets locked due to high traffic
– User information is sent to other internal systems which are written in a different language
– And many more such cases where direct communication is required between applications.
A message can include any kind of information. It could, for example, have information about a process or task that should start on another application (which could even be on another server), or it could be just a simple text message. The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then processes the message.
Message queueing allows web servers to respond to requests quickly instead of being forced to perform resource-heavy procedures on the spot that may delay response time. Message queueing is also good when you want to distribute a message to multiple consumers or to balance loads between workers.
The consumer takes a message off the queue and starts processing the PDF. At the same time, the producer is queueing up new messages. The consumer can be on a totally different server than the producer or they can be located on the same server. The request can be created in one programming language and handled in another programming language. The point is, the two applications will only communicate through the messages they are sending to each other, which means the sender and receiver have low coupling.
#Rabbitmq #message_broker
A message broker acts as an intermediary platform when it comes to processing communication between two applications. RabbitMQ is one such open-source enterprise messaging system modeled on the Advanced Message Queuing Protocol (AMQP) standard. In this blog post, I will describe a scenario that led us to get to the bottom of a development problem and understand the real need behind using such a service.
```
public void RegisterUser(User user)
{
//Register user
userService.Register(user);
//Send welcome email
emailService.SendWelcomeEmail(user)
//Call third party api for affiliate tracking
//audit log
}
```
A new registration module went live and did work like a charm initially. One of the early problems we encountered was that the registration module showed an error once a user finished the registration process. Subsequent investigations revealed that the third-party SMTP APIs were down for some time. It was during this downtime that a user registered but never received confirmation emails.
Keeping the above in mind, we also had to take into account the following scenarios:
– Third-party API stops working
– Audit log table gets locked due to high traffic
– User information is sent to other internal systems which are written in a different language
– And many more such cases where direct communication is required between applications.
A message can include any kind of information. It could, for example, have information about a process or task that should start on another application (which could even be on another server), or it could be just a simple text message. The queue-manager software stores the messages until a receiving application connects and takes a message off the queue. The receiving application then processes the message.
Message queueing allows web servers to respond to requests quickly instead of being forced to perform resource-heavy procedures on the spot that may delay response time. Message queueing is also good when you want to distribute a message to multiple consumers or to balance loads between workers.
The consumer takes a message off the queue and starts processing the PDF. At the same time, the producer is queueing up new messages. The consumer can be on a totally different server than the producer or they can be located on the same server. The request can be created in one programming language and handled in another programming language. The point is, the two applications will only communicate through the messages they are sending to each other, which means the sender and receiver have low coupling.
#Rabbitmq #message_broker
Комментарии