This is a sample project showing how to use Cukes RabbitMQ extensions
To avoid coupling with external providers sample project runs own AMQP broker.
Apache Qpid is used as in-memory AMQP broker.
If you would like how it works you can start with lv.ctco.cukes.rabbitmq.sample.configuration.InMemoryAMQPBroker.
cukes.properties is configured to use in-memory AMQP broker.
System under test can be described with the following diagram:
+-----------------+
+-+----+-+ +-+----+-+ | |
| | In | +--------+ +--------->| | Q1 | +--->| PrependHello |
+-+----+-+ v | +-+----+-+ | |
+-------+------+ +-----------------+
| |
| Exchange |
| |
+---+---+------+ +-----------------+
+-+----+--+ | | +-+----+-+ | |
| | Out| |<-------+ +--------->| | Q2 | +--->| ToUpperCase |
+-+----+--+ +-+----+-+ | |
+-----------------+
It declares one exchange, two workers (PrependHello and ToUpperCase) and a couple of queues (in and out).
Clients will send in input messages to the exchange and based on routing key they will be consumed by one of the workers.
Response message will be send to out queue.
There is a JUnit-based test runner configured - lv.ctco.cukes.rabbitmq.sample.RunCukesRabbmitMQTest.
It starts in-memory AMQP broker first, then runs all tests and in the end shuts down AMQP broker.
There are 2 options to run test suite:
- Run it as JUnit test -
lv.ctco.cukes.rabbitmq.sample.RunCukesRabbmitMQTest
- Run using Maven -
mvn clean test