public void OnGetLogMessages() { var result = ""; _rabbitMq.Channel.QueueDeclare(queue: "TestQueue", durable: false, exclusive: false, autoDelete: false, arguments: null); var consumer = _rabbitMq.CreateConsumer(); consumer.Received += ConsumerOnReceived; _rabbitMq.Channel.BasicConsume(queue: "TestQueue", autoAck: true, consumer: consumer); }