Testing RabbitMQ applications

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.

Unit testing of RabbitMQ applications

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.

Integration testing ...

Get Learning RabbitMQ now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.