5 uses for enterprise messaging software solutions
By: Ryan Vergara
Tags: Message Broker, Networking, Software Engineering, Software Architecture

What Michelin Star Restaurants Can Teach Us About Message Brokers

Let’s say you are in a jam packed restaurant (in the times before the pandemic and social distancing requirements). This restaurant serves the best pasta and the filled up tables are evidence to you that their pasta’s reputation is well grounded.

Stay with me here, I’ll explain in a moment why we’re talking about pasta in an article on message brokers.

You sit down. A waiter comes over and asks for your order, which is, of course, the world-famous pasta dish. The waiter repeats the order and then tells you it’s going to take a few minutes since it’s a full house today.

He passes your order to the kitchen. The kitchen queues your order along with the preceding and succeeding ones.

While waiting you see the pleasure on the faces of the other customers while you munch on the free peanuts. After some time, say fifteen minutes, your pasta arrives — it’s as good as they say it is!

So what does this restaurant have to do with message brokers?

Software systems work the same way. In decoupled systems we have several software applications that need to communicate with each other or with a central database. The applications are the restaurant customers who want to eat the world-famous pasta. The kitchen and the chef represent the database.

The waiter — is the message broker.

The waiter/message broker’s task is to receive the message from one or more of the applications. It then passes this message into a queue that the kitchen/database server receives.

Based on the chronological order the requests are received in then that the database server can process the request and send a response accordingly. First request in — first request out.

The message broker then receives the response from the database server and then makes sure that whoever needs that particular response from among the several applications that made requests will get it.

A sample diagram of an architecture that utilizes message brokers. Image source

All of this happens asynchronously. Which means while waiting for the response from the database server, each application that made a request need not pause their other tasks.

There are several message brokers/tools that you can use for this particular system design. Some of the popular message broker tools are ActiveMQ, RabbitMQ, Apache Qpid and Redis. And then there are services that can enhance your usage of such message brokers, such as RedHat , Amazon Web Services and OpenLogic.

Five use cases where message brokers can really shine

Order processing in e-commerce

E-commerce most certainly made our lives easier by allowing us to shop from the comfort of our couches. We place an order, pay using our credit cards (or PayPal, see succeeding use case below), after a day or even just a few hours our ordered product is at our doorstep.

Behind the scenes, this whole system is composed of independent services. There’s a service that handles the taking of orders. This then has to communicate to the service that manages inventory so the ordering service will know if it’s possible to proceed. If there is enough stock for the product the ordering then communicates to the payment service and then later on to the fulfillment service.

Message broker indeed makes this flow look like magic in the eyes of the customer!

Financial Transactions

Credit card payments and payment gateways such as PayPal and Payoneer have created a more convenient and more secure way of paying for products and services.

So a service like Visa, Mastercard or Paypal will have to communicate with another service — hosted by the bank for both the receiving party and the bank of the paying party.

Any financial and banking related transaction surely needs the highest levels of accuracy and security. Double payment can cause regulatory issues and, worse, irritated customers. Security wise, financial data must be kept safe at all costs from cyber-criminals.

The message queuing and exchanges among the several parties in a financial transaction are kept secure and flowing accurately by message brokers.

Email Marketing

One major activity internet marketers perform is collecting email leads through opt-in pages (pages where they offer something for free in exchange for the web page visitor filling up a form that asks for their email address). These leads will then be in the marketer’s email list and will start receiving daily automated emails (sequenced).

How the emails are queued depending on the day and time the email addresses are added into the list is a process that requires the powers of a message broker.

Medical Industry Applications

In the medical field, there are certainly important uses for message brokers.

For instance, imaging equipment and procedures such as CT-Scans and MRIs may need data (images) captured from patients to be quickly stored into the hospital’s (medical institution’s) database. Then this data may be made available to authorized practitioners.

As regulations are pretty strict with regards to medical data privacy and that each data point is vital to be kept updated and accurate, it is essential for message brokers to flawlessly queue and process information for use cases in this industry.

Electric vehicles

More and more of our daily used appliances utilize the internet. But probably one of the better examples of where message brokers can shine is in electric vehicles such as Tesla’s.

A car is in itself a complex machine. We’re not gonna dig into the nuts and bolts (figurative and literal) of cars here but look at the extended features afforded by electric cars instead. For one, these vehicles are now internet connected to a central server as well as to each other. Tesla’s servers for example can monitor each and every Model S on the road and which speeds they are going at.

Message brokers facilitate communication among vehicles as well as to central servers gathering and providing critical information to each vehicle.

In conclusion…

As software systems are becoming more complex we need ways to bring sanity to the madness brought about by this complexity. Message brokers indeed have demonstrated their value in that regard. They make it possible for software engineers to design highly scalable systems without making these systems brittle.