Reputation: 1705
Does anyone know if there is a H2 Database equivalent for RabbitMQ queues(or with extension capability to make it compatible with RabbitMQ)?
I would like to run integration tests without having to start and connect to an external RabbitMQ server. It would be much nicer if I could start the server before a certain set of tests are being executed, connect to it and then turn off everything before the next set of tests are executed.
Upvotes: 15
Views: 6431
Reputation: 1705
After some research I discovered that there is interchangeability between brokers and clients for the same version of AMQP.
Namely, a client library implemented to use AMQP 0.9.1 should in theory be able to connect to a broker that implements AMQP 0.9.1. This obviously comes with some limitations around specific features implemented in a client/broker that are not defined in the AMQP standard.
More details about the supported functionality can be found below at the following url: https://www.rabbitmq.com/interoperability.html
I am using Apache Qpid as a embedded replacement for the RabbitMQ server.
The simplest way to start is to create an initial configuration file from the Qpid binary executable(documented in the manual for the Java broker) then use this in the code to start the broker:
BrokerOptions configuration = new BrokerOptions("path-to-initial-configuration.json);
Broker broker = new Broker();
broker.startup(configuration);
Upvotes: 11