Details
Description
I have stopped the ActiveMQ service and then tried to start the connection
It is throwing NmsConnectionException was caught for the above environment
But if try with below environment i am getting ConnectionClosedException
.Net Framework4.0,
Apache.NMS.ActiveMQ 1.5.5.2676
Apache.NMS 1.5.0.2194
ActiveMQ 5.9.1
Here, ConnectionResumedListener event working fine for me after start the ActiveMQ service
Below is the my sample code
if (this._connectionFactory == null) { this._connectionFactory = new NMSConnectionFactory(this._brokerCnfg.BrokerUri); } this._connection = this._connectionFactory.CreateConnection(this._brokerCnfg.UserName, this._brokerCnfg.Password); if (this._isFirstOpen) { this._connection.ConnectionInterruptedListener += new ConnectionInterruptedListener(this.NMSConnectionInterrupted); this._connection.ConnectionResumedListener += new ConnectionResumedListener(this.NMSConnectionResumed); } this._connection.ClientId = ClientName + this._brokerCnfg.ClientID; // Here exception is throwing this._connection.Start(); this._session = this._connection.CreateSession();
please help to resolve the issue