[rabbitmq-discuss] RabbitMQ .NET client 3.2.3 bug?

Steve T ssteo at roboqa.com
Sun Feb 23 13:51:48 GMT 2014


Hi,

Sorry for sending to this mail list, not sure if this is the right channel
to report this issue.

I'm using RabbitMQ .NET client 3.2.3 with RabbitMQ 3.2.3 but encountering
some random errors thrown from within the client itself. The error below
happens very occassionally during item publishing via my own function
EnqueueItem();


Stack Trace:
System.Net.Sockets.SocketException: The descriptor is not a socket
  at System.Net.Sockets.Socket.SetSocketOption (SocketOptionLevel
optionLevel, SocketOptionName optionName, Int32 optionValue)
  at System.Net.Sockets.TcpClient.set_ReceiveTimeout (Int32 value)
  at RabbitMQ.Client.Impl.SocketFrameHandler_0_9.set_Timeout (Int32 value)
  at RabbitMQ.Client.Impl.ConnectionBase.ClosingLoop ()


My code is fairly straightforward, shown below:


        private static void EnqueueItem(string queue, string json)
        {
            ConnectionFactory connectionFactory = new ConnectionFactory()
            {
                HostName = ROBOQA_RABBITMQ_HOSTNAME,
                UserName = ROBOQA_RABBITMQ_USERNAME,
                Password = ROBOQA_RABBITMQ_PASSWORD
            };

            using (IConnection iconnection =
connectionFactory.CreateConnection())
            {
                using (IModel channel = iconnection.CreateModel())
                {
                    channel.QueueDeclare(queue, true, false, false, null);
                    IBasicProperties properties =
channel.CreateBasicProperties();
                    properties.SetPersistent(true);

                    channel.BasicPublish(String.Empty, queue, properties,
Encoding.UTF8.GetBytes(json));
                }
            }
        }

Will be great if anyone can let me know if there is a problem with the way
I use it or maybe a bug in the client driver itself?

Thanks,
Steve.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140223/33d0899b/attachment.html>


More information about the rabbitmq-discuss mailing list