About the module

Developing and testing distributed systems is hard. Using a message broker is no exception - this is the reason the module exists: It helps you to minimize these technical challenges.

Messaging systems provide the ability to send and receive messages in an asynchronous way, which is great for production but a nightmare for debugging and testing. This is why the module introduces a simple common interface for accessing a message broker: This allows us to swap the implementation from a real one (that is connecting to your external broker) to a dummy one that executes everything in a synchronous way within your PHP request.

This is obviously a bit slow and has not the power of a real message broker. The advantage you get is an improved developer experience allowing you to understand, debug and test your system much more easily.

Simplifies testing and debugging

Thanks to the dummy implementation you dont need to install a full featured message broker product to get started. You can develop and test your system much more easily because you are minimizing the dependencies to external systems.

Furthermore you can continue to debug your code using Xdebug or your debugger of choice. Everything can be processed within one request, which allows you to step through your message broker code.

Support for AMQP

Right now we only support AMQP, which is an open industry standard used in many open source and commercial products. But there is nothing preventing you from developing an implementation that uses STOMP or another protocol. The interface provided by the Message Broker module is not tied to a specific protocol or standard.