activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cppdeveloper <turtle...@gmail.com>
Subject Re: connection->start() or connection->createSession() hangs when trying to connect ActiveMQ-CPP client with OpenMQ broker via STOMP
Date Mon, 16 Aug 2010 16:45:48 GMT

>From debugging the StompWireFormat class, I see that the CONNECT frame is
marshalled and sent from ActiveMQ-CPP to the OpenMQ broker, and OpenMQ
starts the connection and send back a frame to the ActiveMQ-CPP client. Then
the StompWireFormat class tries to unmarshal the message in the function:

Pointer<Command> StompWireFormat::unmarshalConnected( const
Pointer<StompFrame>& frame ) {

    Pointer<Response> response( new Response() );
    if( frame->hasProperty( StompCommandConstants::HEADER_RESPONSEID ) ) {

        response->setCorrelationId( Integer::parseInt(
            frame->getProperty( StompCommandConstants::HEADER_RESPONSEID ) )
);
    } else {

        throw IOException(
            __FILE__, __LINE__, "Error, Connected Command has no Response
ID." );
    }

    return response;
}


The function enters the "else" statement, meaning it does not recognize the
frame, and throws the exception (however, this hangs and is never printed to
the screen). 

Is there anything that can be done here or is there no hope of being able to
use OpenMQ with the ActiveMQ-CPP client?

Thanks. 



Timothy Bish wrote:
> 
> On Thu, 2010-08-12 at 14:14 -0700, cppdeveloper wrote:
>> 
>> Timothy Bish wrote:
>> > 
>> > You can append this option to the connection URI to get the Commands
>> > that are sent and received logged to the console:
>> > 
>> > transport.commandTracingEnabled=true
>> > 
>> > I Don't know how to configure that on the OpenMQ side.
>> > 
>> > Regards
>> > 
>> 
>> When I did this to the ActiveMQ-CPP client, I saw the following output
>> before it hung: 
>> 
>> SEND: ConnectionInfo { commandId = 1, responseRequired = true,
>> ConnectionId
>> = ID:csa-nexus-43500-1281649512267-0:0, ClientId =
>> ID:csa-nexus-43500-1281649512267-1:0, Password = admin, UserName = admin,
>> BrokerPath = NULL, BrokerMasterConnector = false, Manageable = false,
>> ClientMaster = false, FaultTolerant = false }
>> 
>> I am in the process of figuring out how to see OpenMQ's Frames
>> sent/received. From this, I am guessing that the connection info was
>> sent,
>> and OpenMQ clearly received it and opened the connection for them, but
>> somehow ActiveMQ-CPP is not receiving a response, so it doesn't know it
>> is
>> okay to send and thus hangs forever. 
> 
> 
> You might need to debug the StompWireFormat class to see what is getting
> marshaled and unmarshaled.  The Command logging only gets you so far, if
> there's a frame coming in that we don't know how to unmarshal it could
> be failing in there, although it should have thrown an exception.
> 
> Regards
> 
> -- 
> Tim Bish
> 
> Open Source Integration: http://fusesource.com
> ActiveMQ in Action: http://www.manning.com/snyder/
> 
> Follow me on Twitter: http://twitter.com/tabish121
> My Blog: http://timbish.blogspot.com/
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/connection-%3Estart%28%29-or-connection-%3EcreateSession%28%29-hangs-when-trying-to-connect-ActiveMQ-CPP-client-with-OpenMQ-broker-via-STOMP-tp29420657p29449176.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message