“Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host” ASP.net C# - NMS.ActiveMQ namespace
This post has NOT been accepted by the mailing list yet.
This post was updated on .
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);
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
I am getting exception on the highlighted line(bold).