views:

105

answers:

1

Are there exists an simple AMPQ server/broker implementation written in Java?

I need it only for local integration tests, starting it from ant/maven, and i don't need any features like a clustering, persistence, performance and so on. Just a fake RabbitMQ-like instance, without installation (just as a dependency at maven pom) and configuration.

A: 

What you are looking for is an AMPQ Mock Object. I really do not know of any and doubt that you will find any off the shelf.
If you are using JUnit as your testing then your are doing UNIT testing. Unit testing is different than integration testing and does not include actually reading/writing to a queue.
Maybe here you could restructure your test or even code to include everything but the read/write to the queue ?
Another option is if you have wrapped your AMPQ into some other class for portability then just mock that object.

Romain Hippeau
I'm already using some MQ mocks for my unit test. But my app is complex and constists of a few stanalone modules, which communicates through MQ. So i want to run it w/o RabbitMQ installed into the system, for easy integration testing.
splix