// Hi all! I'm a little stuck. I keep getting back this error: {"No compatible authentication mechanism found - server offered [ANONYMOUS]"} when trying to connect to our development databus.// I don' have the specifics for the databus, as it's with a different group -- but I still feel like this should work (?)
// It fails on trying to create the connection (inside the first using statement). Any pointers or help would be greatly appreciated!
var factory = new ConnectionFactory() { HostName = "xxxx", UserName = "xxx", Password = "xxx"};
using(var connection = factory.CreateConnection())
using(var channel = connection.CreateModel())
{
channel.QueueDeclare(queue: "hello", durable: false, exclusive: false, autoDelete: false, arguments: null);
string message = "Hello World!";
var body = Encoding.UTF8.GetBytes(message);
channel.BasicPublish(exchange: "", routingKey: "hello", basicProperties: null, body: body);
Console.WriteLine(" [x] Sent {0}", message);
}
Console.WriteLine(" Press [enter] to exit.");
Console.ReadLine();