What is a Message Broker for?
I’ve been working in tech for a few years now, and that’s included writing a lot of code.
One thing I never got my head around was what is a message broker? I’ve definitely seen them in architecture meetings, and heard people speak of ‘RabbitMQ’ and ‘Redis’ but I don’t really know what they’re for.
So here’s my explanation.
A message broker is like a postoffice
A message broker: is a bit like a letter, a post office and a postman all in one.
It accepts and forwards messages. The messages get produced by a ‘producer’ and put onto a ‘queue’ and then collected by a ‘consumer’.
One reason you may want to do this is that you may want to store calculations made by a prediction server in a queue, and then have a web server poll that, and then present the results to a user. The advantage of this is that you can decouple the functionality from the web server – say a prediction server.
Other use cases
- What about when your organization wants to work with the new Internet of Things (IoT). Then you would have thousands of devices, but how do you manage the data of all those devices? Well this is where a Message Broker also excels in. Just send all your data of these devices towards your Message Broker, and it will take care of processing them.
A nice use case from – this article
- Running Redis on our machine
- Queuing up data (images) to our Redis store to be processed by our REST API
- Polling Redis for new batches of input images
- Classifying the images and returning the results to the client
So there you have it, you may often want to queue up data to be processed, and you may not want to do it all at once. This is a very powerful technique for helping you build performant and scalable applications.
Is there something I’ve missed? Let me know on Twitter if I’m wrong
Source: https://peadarcoyle.com/2018/09/22/what-is-a-message-broker-for/
Anyone can join.
Anyone can contribute.
Anyone can become informed about their world.
"United We Stand" Click Here To Create Your Personal Citizen Journalist Account Today, Be Sure To Invite Your Friends.
Please Help Support BeforeitsNews by trying our Natural Health Products below!
Order by Phone at 888-809-8385 or online at https://mitocopper.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomic.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomics.com M - F 9am to 5pm EST
Humic & Fulvic Trace Minerals Complex - Nature's most important supplement! Vivid Dreams again!
HNEX HydroNano EXtracellular Water - Improve immune system health and reduce inflammation.
Ultimate Clinical Potency Curcumin - Natural pain relief, reduce inflammation and so much more.
MitoCopper - Bioavailable Copper destroys pathogens and gives you more energy. (See Blood Video)
Oxy Powder - Natural Colon Cleanser! Cleans out toxic buildup with oxygen!
Nascent Iodine - Promotes detoxification, mental focus and thyroid health.
Smart Meter Cover - Reduces Smart Meter radiation by 96%! (See Video).