Laravel Microservice Communication using RabbitMQ Message Broker

Cerwyn Cahyono
Geek Culture
Published in
8 min readMay 13, 2021

--

Laravel + Rabbit MQ

Dealing with big website projects is cumbersome when we’re using monolith architecture. As a Laravel developer, it’s quite challenging, because basically, Laravel offers us a full-stack development where you can work with Front-end as well as Back-end in the same project, in other words, monolithic application. The question is, can we develop microservices using Laravel (or maybe Lumen) for a bigger project? Of course, we can.

Before we go on, what are the bad things about developing apps using monolithic architecture? Well, because all the functionalities are inside in one project, means that every time we make any changes (even a small one) we’ll re-deploy our entire app, which may affect the whole app. With the big-scale project, it’ll much harder to maintain. So, microservices architecture comes to help, where we can separate its functionality into a standalone component.

A message broker acts as a middleman for the microservices, receiving messages from one application (producers) and handing them over to others (consumers) to do the job. — https://www.cloudamqp.com

When we’re dealing with microservices, we need to prepare something for our…

--

--

Cerwyn Cahyono
Geek Culture

PHP/Backend Engineer at Undercurrent Capital Pte Ltd — Data Science Enthusiast