0

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)

David Aleu
  • 3,922
  • 3
  • 27
  • 48

1 Answers1

2

The solution that worked for me invoked using an older version of rabbitmq.client install-package RabbitMQ.Client -version 3.1.5

Hopefully this helps someone

Lyon
  • 711
  • 8
  • 11
  • which version of SignalR.RabbitMQ are you using? and EasyNetQ? – David Aleu Jan 29 '15 at 09:15
  • client 3.1.5 the rabbitmq server is shaded in magic and managed by a different team, so we current do not use easynetq – Lyon Jan 31 '15 at 16:43
  • Same issue today - newest version (as of last week) is 4.0.0... downgrading to RabbitMQ to 3.6.5 solaved my issue – WernerCD Aug 23 '16 at 17:29