You'd need to share the URI for anyone to know for sure, my guess would be you gave it a failover URI and it's sitting there trying to connect to a host that doesn't exist which is expected behavior

On 10/21/2016 11:20 AM, ravican09 wrote:
Error handling does not work the way we would expect for some reason tester
given  invalid urlQueue for the connectionFactory , the program simply
hangs,

below is the sample code


  try
                     {
                         var connectionUri = new Uri(ConnectionUri);
                         IConnectionFactory connectionFactory = new
NMSConnectionFactory(connectionUri);
                         Log.Debug(string.Format("NMS Event: Creating
Connection: {0}", connectionUri));
                         _connection =
connectionFactory.CreateConnection(_userName, _password);
                        Log.Debug(string.Format("NMS Event: Created
Connection: {0}", connectionUri));
                         if (_connection.IsStarted == false)
                         {
                             Log.Debug(string.Format("NMS Event: Starting
Connection: {0}", connectionUri));
                             _connection.Start();
                             Log.Debug(string.Format("NMS Event: Started
Connection: {0}", connectionUri));
                         }
                         _connection.ExceptionListener += ExceptionListener;
                         _connection.ConnectionInterruptedListener +=
ConnectionInterruptedListener;
                         _connection.ConnectionResumedListener +=
ConnectionResumedListener;
                     }
                     catch (Exception ex)
                     {
                         Log.Error("Error creating NMS Connection.", ex);
                         throw;
                     }



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/NMS-Active-MQ-Error-handling-and-debuggin-in-C-tp4668567p4718243.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.



--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to