Hi,
I am trying to connect to ActiveMQ which is not running or stopped through an ActiveMQ-CPP client. The application hangs while doing this and I need to kill the application through task manager. (i.e. getting hung at "connectionFactory->createConnection(uname,pwd,applicationId);" at this statement. When I tried to debug the code, it is hanging at "connection->setDefaultClientId( this->settings->clientId );" in ActiveMQConnectionFactory.cpp. Please find attached output log from Visual Studio. I am using Broker URI as "failover:tcp://localhost:61616?transport.useInactivityMonitor=true". Also I tried to use "failover:tcp://localhost:61616?startupMaxReconnectAttempts=3&transport. useInactivityMonitor=true". This is also hanging the application. Could someone please let me know how can I solve this and through an exception when ActiveMQ server is not running. Also please let me know if I need to add any more configuration. Thanks & Regards Suneel Debug log from Visual Studio is: 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\FWPUCLNT.DLL' 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\rasadhlp.dll' 'MBBL_Test_App.exe': Loaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL' First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::net::SocketException at memory location 0x022be228.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be36c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be5b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022be56c.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022be8d4.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bed90.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory location 0x022bf0b0.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::io::IOException at memory location 0x022bf254.. First-chance exception at 0x75dbb727 in MBBL_Test_App.exe: Microsoft C++ exception: decaf::lang::exceptions::NoSuchElementException at memory location 0x022bf344..