Skip to content
Cy Scott edited this page Mar 21, 2016 · 1 revision

What is Rabbit 2 Go?

Rabbit 2 Go will run a stand alone process that runs RabbitMQ server in parallel to your process. The concept was taken from Mongo2Go. We needed this for doing integration testing with NServiceBus.

How does it work?

It is really simple. The most basic way to run RabbitMQ is:

using (var rabbitMq = new RabbitMqProcess())
{
	//starts rabbit mq
	await rabbitMq.Run();
	//do you rabbit mq related stuff here
}

If you don't want to use any of the default settings for RabbitMQ, then you could change the settings like:

using (var rabbitMq = new RabbitMqProcess())
{
	rabbitMq.RabbitMqEnvironmentVariables.RabbitMqConfigFile = "config file goes here";
	rabbitMq.RabbitMqEnvironmentVariables.RabbitMqNodePort = "port number for rabbit mq";
	//starts rabbit mq
	await rabbitMq.Run();
	//do you rabbit mq related stuff here
}
Clone this wiki locally