All the world will be your enemy, Prince of a Thousand enemies. And when
they catch you, they will kill you. But first they must catch you; digger,
listener, runner, Prince with the swift warning. Be cunning, and full of
tricks, and your people will never be destroyed. -- Richard Adams

This module provides a more natural API over Net::AMQP::RabbitMQ, with separate objects for channels, exchanges, and queues.

If you are testing code that uses Crixa, you may want to mock out the use of an actual rabbitmq server with something that is a little simpler to test. In that case, you can pass a Test::Net::RabbitMQ object to the Crixa->connect method:

Note that if you are publishing and consuming messages, this all must happen in a single process and a single Test::Net::RabbitMQ object in order for this mocking to work.

If the code that publishes messages makes a separate Crixa object from the one you use to test those messages, you need to be careful to share the same Test::Net::RabbitMQ object. Also, since the Crixa object calls its disconnect() method when it goes out of scope, you may need to reconnect the Test::Net::RabbitMQ object or it will die when you call methods on it.

This module uses Net::AMQP::RabbitMQ under the hood, though it does not expose everything provided by its API.

The best documentation we've found on RabbitMQ (and AMQP) concepts is the Bunny documentation at http://rubybunny.info/articles/guides.html. We strongly recommend browsing this to get a better understanding of how RabbitMQ works, what different options for exchanges, queues, and messages mean, and more.