Testing is essential to ensure that a system works as expected. In this sense, the message broker is no exception. In the next sections, we will cover very briefly the different aspects of testing applications that use RabbitMQ as a message broker.
You can test applications that publish/subscribe to a RabbitMQ broker by isolating client API calls to the broker using a mocking framework such as JMock or Mockito in case of Java. The mocking library to use depends on the language that you are using to interact with the broker, but, in general, you would mock calls to the broker as you would with any other type of external system that is used by your application.