Howdy
On Mon, 16 Apr 2007, Jibin Raju wrote:
> my code :
>
> ActiveMQConnectionFactory* connectionFactory = new
> ActiveMQConnectionFactory("tcp://192.168.29.200:61616");
> Connection* connection = connectionFactory->createConnection(); //get Error
>
> //Error
> WARNING: activemq::io::SocketInputStream::read - The connection is broken
> FILE: ..\src\main\activemq\network\SocketInputStream.cpp, LINE: 139
> FILE: ..\src\main\activemq\io\BufferedInputStream.cpp, LINE: 158
> FILE: ..\src\main\activemq\io\BufferedInputStream.cpp, LINE: 81
> FILE: ..\src\main\activemq\connector\stomp\StompCommandReader.cpp,
> LINE:
> 216
> FILE: ..\src\main\activemq\connector\stomp\StompCommandReader.cpp,
> LINE:
> 120
> FILE: ..\src\main\activemq\connector\stomp\StompCommandReader.cpp,
> LINE:
> 71
> FILE: ..\src\main\activemq\transport\IOTransport.cpp, LINE: 165
> - tid: 2020
>
> //Then got an Exception (ActiveMQConnectionFactory.cpp, stompconnector.cpp)
> Unhandled exception at 0x7c59bc3f (KERNEL32.DLL) in ActiveMq_Test.exe:
> Microsoft C++ exception: activemq::exceptions::ActiveMQException at memory
> location 0x0012fd8c..
>
> pls suggest soultion
Judging from the stack trace, AMQCPP is trying to use the Stomp wire
format to communicate with your broker. This would indicate a few
things to check:
1. Are you running a recent version of AMQCPP? The default wire format
was changed to Openwire in 2.0 (which I can definately recommend).
I.e., if you don't specify a wire format (which you don't), it should
be using Openwire, not Stomp.
2. Is your broker running on the specified IP and port? I.e. can you
connect to the broker using Java?
3. Is your broker running Stomp on the specified port? 61616 is
typically the port for Openwire. Stomp is on port 61613 by default.
Check your broker's log messages when it starts up.
Assuming you have AMQCPP 2.0, try one of the following broker URLs:
tcp://yourhost:61616?wireFormat=openwire
or
tcp://yourhost:61613?wireFormat=stomp
Regards,
Albert