static void Main(string[] args) { Console.WriteLine("Rabbit MQ Console Application!"); RabbitMQ_Fanout.RunExample(); RabbitMQ_Direct.RunExample(); RabbitMQ_Topic.RunExample(); RabbitMQ_AlternateQueue.RunExample(); }
public static void RunExample() { // Receive messages using (RabbitMQ_Fanout rabbitMQHelper = new RabbitMQ_Fanout()) { rabbitMQHelper.PublishMessage(EXCHANGE_NAME, "Hi there", ""); rabbitMQHelper.PublishMessage(EXCHANGE_NAME, "How are you?", ""); rabbitMQHelper.ActiveListeninFromQueue(RabbitMQ_Fanout.QUEUE_NAME_1); rabbitMQHelper.ActiveListeninFromQueue(RabbitMQ_Fanout.QUEUE_NAME_2); Console.WriteLine("Press any key to continue..."); Console.ReadLine(); } }