Question

So, I read that Magento 2.3 will be introducing Messages Queues to Open Source. A feature currently available in the Commerce Edition.

I've found some information about it here and here. But I'm struggling to wrap my head around the terminology.

enter image description here

Please, could someone provide me with some real-case examples of how this is used. And also why it's such a good thing to have included in the Open Source Edition.

Thanks

Was it helpful?

Solution

One common use we have for Magento message queues is related to ERP integrations. For example: When a user places an order we want to transmit that data to a remote system. This transmission process over the network takes time that we don't want the user to wait.

Using a message queue allows us to decouple the ERP integration process from the customer order process. When Magento fires the sales_order_place_after event we just pass the order id (message) into the order export message queue (publisher) and let the order complete normally.

Now the message broker (RabbitMQ) will queue the order ids (messages) waiting for export until another process (consumer) to take an order id (message) and export that order. With the consumer being a background process there is more flexibility in running time and error handling.

It really took me playing with RabbitMQ to connect all the dots but hopefully, this is helpful.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top