In memory queue server
Asked Answered
B

1

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.

Burmese answered 14/5, 2014 at 8:48 Comment(2)
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. activemq.apache.org/…Translation
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.Burmese
B
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);
Burmese answered 21/5, 2014 at 8:25 Comment(1)
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.Chaperon

© 2022 - 2024 — McMap. All rights reserved.