Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In memory queue server

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.

like image 929
alxbrd Avatar asked May 14 '14 08:05

alxbrd


People also ask

What is an in memory queue?

An in-memory queue is a queue that stores data in memory. In-memory queues are used to improve application performance by providing a fast, low-latency way to access data. They are often used in conjunction with other data storage mechanisms, such as databases, to provide a complete data storage and retrieval solution.

What is RabbitMQ server used for?

RabbitMQ is a messaging broker - an intermediary for messaging. It gives your applications a common platform to send and receive messages, and your messages a safe place to live until received.

How does RabbitMQ work?

RabbitMQ is a widely used open-source message broker that helps in scaling the application by deploying a message queuing mechanism in between the two applications. It offers temporary storage for data preventing data loss. RabbitMQ Queue takes messages from the publisher and sends them to the consumer.

Is RabbitMQ a FIFO?

Queues in RabbitMQ are FIFO ("first in, first out"). Some queue features, namely priorities and requeueing by consumers, can affect the ordering as observed by consumers.


1 Answers

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);
like image 79
alxbrd Avatar answered Sep 30 '22 06:09

alxbrd