C# Windows Forms app problem with Rabbitmq client 4.0.0

432 views
Skip to first unread message

Roberto Alessi

unread,
Aug 22, 2016, 9:18:06 AM8/22/16
to rabbitmq-users
I'm new with RabbitMQ, and i have a problem with then client 4.0.0
If i create RabbitMQ Console apps with Visual Studio 2015 (with latest updates, under Windows 10) using .net 4.5.2 and the 4.0.0 client all ok.
The RabbitMQ server is a Ubuntu LTS 16.05 instance on Azure.
Trying to create a Windows Form app, for example the code in this page https://simonwdixon.wordpress.com/2011/05/08/getting-started-with-rabbitmq-in-dotnet/ ,if i use the 3.6.5 version (the last one before 4.0,0) using .NET 4.5.2 still ok.
if i update via Nuget the RabbitMQ client to the 4.0.0. version of RabbitMQ the code hangs at the at the .CreateConnection method, for example

protected IModel Model;
protected IConnection Connection;
protected string QueueName;

public Producer(string hostName, string queueName)
{
    QueueName = queueName;
    var connectionFactory = new ConnectionFactory { HostName = hostName, UserName = "mquser", Password = "somepwd" };
    Connection = connectionFactory.CreateConnection();
    Model = Connection.CreateModel();
    Model.QueueDeclare(QueueName, false, false, false, null);
}

with the above code at the .CreateConnection the app hangs: no exceptions, no sign of life after minutes, no more visible app interface.
Could someone explain which is the problem ?




Karl Nilsson

unread,
Aug 22, 2016, 9:32:10 AM8/22/16
to rabbitm...@googlegroups.com
Hi,

I tested your code against a locally running RabbitMQ instance and was not able to produce the same behaviour. Is there anything in the broker logs that could provide some more details as to what is going on at the time. What version of the broker are you using?

Cheers
Karl

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ

Karl Nilsson

unread,
Aug 23, 2016, 7:14:57 AM8/23/16
to rabbitm...@googlegroups.com
Hi Roberto,

I was eventually able to reproduce your problem and there is now a release candidate of 4.0.1 available on nuget.org (https://www.nuget.org/packages/RabbitMQ.Client/4.0.1-rc1). Would you mind trying this to see if it addresses your problem?

Cheers
Karl

To post to this group, send email to rabbitm...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Karl Nilsson

Staff Software Engineer, Pivotal/RabbitMQ
Reply all
Reply to author
Forward
0 new messages