Modern applications are getting more and more complex. Time and resource-consuming operations, communication between multiple services, processing lots of data – that’s only a few of many problems that developers have to face. Fortunately, there are solutions that can simplify some of these challenges. One of them is using a message broker.

What is a message broker? ✉️

A message broker is a piece of software, which enables services and applications to communicate with each other using messages. The message structure is formally defined and independent from the services that send them.

This allows applications to share information with one another, even if they’re written in different programming languages!

Sounds cool, right?

How do message brokers work? 🤔

Before we start let’s get through some basic concepts of a message broker:

  • Producer – the application responsible for sending messages. It’s connected with the message broker. In publish/subscribe pattern (we’ll move on to that) they are called publishers .
  • Consumer – the endpoint that consumes messages waiting in the message broker. In publish/subscribe pattern they are called subscribers .
  • Queue/topic – a folder in a filesystem. Message broker uses them to store messages.

#developer stories #php #software architecture #architecture #php

Message Broker – Complete Know-how, Use Cases and A Step-by-step Guide
1.60 GEEK