Hi folks, 

i get the above error message and i am absolutely clueless about what to do.
I googled a lot, many hits deal with the same error message but with a quite
different situation (in most cases the error occurs when the broker shuts
down)

The situation:

I got activemq running with one single, simple Broker:

<beans>

  <!-- Allows us to use system properties as variables in this configuration
file -->
  <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

  <broker brokerName="singleBroker" useJmx="true"
xmlns="http://activemq.org/config/1.0";>

    <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
    <managementContext>
       <managementContext connectorPort="4444"
jmxDomainName="org.apache.activemq"/>
    </managementContext>


    <!-- In ActiveMQ 4, you can setup destination policies -->
    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="ice">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>

    <transportConnectors>
       <transportConnector uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
    </transportConnectors>

  </broker>
</beans>

Now i have a simple Consumer and Producer based on activmq-cpp and the
example source-code they provide.

Both consumer and producer work well but __only__ if i use openwire.

If i start the consumer/ producer with a URL like:

tcp://172.18.117.126:61618?wireFormat=openwire&transport.useAsyncSend=false

everything is fine and i see that the consumer receives the messages sent to
him by the producer.

But if i alter the URL to use stomp as wireformat:

tcp://172.18.117.126:61618?wireFormat=stomp&transport.useAsyncSend=false

I get the following errors when i start the consumer:

=====================================================
Starting the Demo-Consumer:
-----------------------------------------------------
Broker URI:
tcp://172.18.117.126:61618?wireFormat=stomp&transport.useAsyncSend=false
useTopic: true
WARNING: activemq::io::SocketInputStream::read - The connection is broken
        FILE: activemq/network/SocketInputStream.cpp, LINE: 147
        FILE: activemq/io/BufferedInputStream.cpp, LINE: 199
        FILE: activemq/io/BufferedInputStream.cpp, LINE: 83
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 216
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 120
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 71
        FILE: activemq/transport/IOTransport.cpp, LINE: 175
 - tid: 3075550096
response from futureResponse was invalid
        FILE: activemq/transport/ResponseCorrelator.cpp, LINE: 145
        FILE: activemq/transport/ResponseCorrelator.cpp, LINE: 152
        FILE: activemq/connector/stomp/StompConnector.cpp, LINE: 256
        FILE: activemq/connector/stomp/StompConnector.cpp, LINE: 165
        FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 190

These are the same error messages when i start up the producer:

=====================================================
Starting the Demo-Producer:
-----------------------------------------------------
Broker URI:
tcp://172.18.117.126:61616?wireFormat=stomp&transport.useAsyncSend=true
useTopic: false
WARNING: activemq::io::SocketInputStream::read - The connection is broken
        FILE: activemq/network/SocketInputStream.cpp, LINE: 147
        FILE: activemq/io/BufferedInputStream.cpp, LINE: 199
        FILE: activemq/io/BufferedInputStream.cpp, LINE: 83
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 216
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 120
        FILE: activemq/connector/stomp/StompCommandReader.cpp, LINE: 71
        FILE: activemq/transport/IOTransport.cpp, LINE: 175
 - tid: 3075644304
response from futureResponse was invalid
        FILE: activemq/transport/ResponseCorrelator.cpp, LINE: 145
        FILE: activemq/transport/ResponseCorrelator.cpp, LINE: 152
        FILE: activemq/connector/stomp/StompConnector.cpp, LINE: 256
        FILE: activemq/connector/stomp/StompConnector.cpp, LINE: 165
        FILE: activemq/core/ActiveMQConnectionFactory.cpp, LINE: 190
-----------------------------------------------------
Finished with the demo ignore errors from this
point on as the sockets breaks when we shutdown.
=====================================================

Meanwhile activemq prints out:

ERROR TransportConnector             - Could not accept connection from
/172.18.103.79:55128: java.io.IOException: Wire format negociation timeout:
peer did not send his wire format.
java.io.IOException: Wire format negociation timeout: peer did not send his
wire format.
        at
org.apache.activemq.transport.WireFormatNegotiator.oneway(WireFormatNegotiator.java:88)
        at
org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:47)
        at
org.apache.activemq.broker.TransportConnection.dispatch(TransportConnection.java:1138)
        at
org.apache.activemq.broker.TransportConnection.processDispatch(TransportConnection.java:805)
        at
org.apache.activemq.broker.TransportConnection.start(TransportConnection.java:885)
        at
org.apache.activemq.broker.TransportConnector$1.onAccept(TransportConnector.java:148)
        at
org.apache.activemq.transport.tcp.TcpTransportServer.run(TcpTransportServer.java:167)
        at java.lang.Thread.run(Thread.java:595)

Especially this line is interesting:

Wire format negociation timeout: peer did not send his wire format.

But i do send the wireFormat, why do i keep getting that error?

Thx for every help folks...

P.S. 

All software (activemq + activemq-cpp) is up-to-date, meaning the current
stable version. 

-- 
View this message in context: 
http://www.nabble.com/openwire-ok%2C-but-when-using-stomp-i-get%3A-Wire-format-negociation-timeout%3A-peer-did-not-send-his-wire-format.-tf4213918s2354.html#a11987990
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to