I wanted to set up a little local test for some components connecting to RabbitMQ. For this, one solution seems to be the QPID In-Memory Broker and actually that works quite well when following these instructions (only using the current version of 7.0.3 instead of 7.0.0)...
For Rabbit MQ, I removed the "AMQP_1_0"
protocol and only added the qpid-broker-plugins-amqp-0-8-protocol
dependency. Also I replaced the Authenticationprovider
with a PLAIN
. This was enough to get my RabbitMQ
components working and sending/receiving messages through that Broker
.
But the problem is this line...
"port" : "${qpid.amqp_port}",
As far as I understand it, this should allow me to define the port the broker is listening at by setting this property when calling systemLauncher.startup
.
attributes.put("qpid.amqp_port", 12345);
Unfortunately, this does not work and the Broker always listens at the default port (5672, iirc). Obviously this is not optimal for automated tests, so I am looking for one of the following possibilities (or a better one):
- Putting a random port in the properties (I can find an open port myself, no problem) or...
- Telling QPID to use a random (open) port - but then I also need to know which port is actually used, since
SystemLauncher
does not seem to offer any way to query that.