15

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.

alxbrd
  • 1,675
  • 1
  • 15
  • 16
  • Basically you are looking for an alternative to RabbitMQ that can be embedded. Are you sure RabbitMQ doesn't have embedding options itself? ActiveMQ does for example. http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html – Gimby May 14 '14 at 08:53
  • Thanks for the suggestion. I have not looked for this specifically, but I will have a look. Because it runs with erlang, it doesn't seem to offer that feature because of its dependencies. – alxbrd May 14 '14 at 08:56

1 Answers1

11

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);
Paolo
  • 1,463
  • 1
  • 11
  • 11
alxbrd
  • 1,675
  • 1
  • 15
  • 16
  • 2
    Right on the spot! I suspect I will run into problems using the 'publisher confirms' / 'publisher returns' features which isn't part if the standard. I'll post my results here as soon as I know how to handle this issue. – Markus T Aug 20 '14 at 14:41