I'm trying to use RabbitMQ messaging using SignalR.RabbitMQ (https://github.com/mdevilliers/SignalR.RabbitMq) from a queue consumer in c# with the code below:
RabbitMQ.Client.ConnectionFactory factory = new RabbitMQ.Client.ConnectionFactory();
factory.UserName= "username";
factory.Password="password";
factory.HostName="host.name.com";
factory.VirtualHost = "VirtualHost";
factory.Port = 5672;
var exchangeName = "SignalR.Messages";
var configuration = new RabbitMqScaleoutConfiguration(factory, exchangeName);
GlobalHost.DependencyResolver.UseRabbitMq(configuration);
var hubContext = GlobalHost.ConnectionManager.GetHubContext<Chat>();
But unfortunately, fails on:
var configuration = new RabbitMqScaleoutConfiguration(factory, exchangeName);
with the error:
"Field not found: 'RabbitMQ.Client.ConnectionFactory.VirtualHost'."
Same connection works fine on a console app. If I remove the VirtualHost still gives the same error.
No idea what's wrong. Found same error here: https://github.com/MassTransit/MassTransit/issues/204 but doesn't help for me. I use EasyNetQ last version (0.40.3.353) and last version of RabbitMQ Client (3.4.3)