“Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host” ASP.net C# - NMS.ActiveMQ namespace

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

“Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host” ASP.net C# - NMS.ActiveMQ namespace

dipoody
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi Team,

I am getting the following error while try to establish ActiveMQ session after creating successful connection.
“Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host”

I am using Apache.NMS.ActiveMQ dll for connecting to queue using C#.net.

Please find the code snippet used for connecting the queue:

                connecturi = new Uri(connectionURI);
                try
                {
                    factory = new NMSConnectionFactory(connecturi);
                }
                catch (Exception ex)
                {
                    factory = new Apache.NMS.ActiveMQ.ConnectionFactory(connecturi);
                }
                connection = factory.CreateConnection();
                session = connection.CreateSession();
                destination = SessionUtil.GetDestination(session, "queue://queueName"); //Name of the Queue
                consumer = session.CreateConsumer(destination); //To consume the message from MQ        
                connection.Start();

                IMessage message;

I am getting exception on the highlighted line(bold).

Give some inputs to resolve the issue.

Regards,
Deepak Varghese
deepukudilingal@gmail.com
Loading...