activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JRR <...@cisco.com>
Subject Re: Do activemq-cpp connection questions.
Date Thu, 01 Dec 2011 01:38:35 GMT
Hi Tim,

I used gdb along with the code and I figured out the problem. It was indeed
my
fault, an ID10T error on my part.

I constructed an invalid broker URI string.

My string was as follows:

    std::string brokerURI =
        "failover:(tcp://127.0.0.1:61616"
        "?initialReconnectDelay=10"
        "&maxReconnectDelay=100"
        "&useExponentialBackOff=false"
        "&maxReconnectAttempts=1"
        "&startupMaxReconnectAttempts=1"
        "&timeout=100"
        "*)*"; 


The problem is with the closing paren. It should be

    std::string brokerURI =
        "failover:(tcp://127.0.0.1:61616*)*" // close out the tcp paren here
        "?initialReconnectDelay=10"        // before adding query parameters
        "&maxReconnectDelay=100"
        "&useExponentialBackOff=false"
        "&maxReconnectAttempts=1"
        "&startupMaxReconnectAttempts=1"
        "&timeout=100";

Now... in my defense... the code in the simple producer example makes it
look
like it is suppose to reside at the end. This is what's in the file 
src/examples/producers/SimpleProducer.cpp

.....
    std::string brokerURI =
        "failover://(tcp://127.0.0.1:61616"
//        "?wireFormat=openwire"
//        "&connection.useAsyncSend=true"
//        "&transport.commandTracingEnabled=true"
//        "&transport.tcpTracingEnabled=true"
//        "&wireFormat.tightEncodingEnabled=true"
        "*)*";
....

So it LOOKS like we just uncomment these lines to add the query parameters.

--
View this message in context: http://activemq.2283324.n4.nabble.com/Do-activemq-cpp-connection-questions-tp4119766p4126180.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message