On Thu, Jul 2, 2009 at 3:09 PM, Leglise Yann<[email protected]> wrote:

> I actually experience problem

> When launching the client, I have the following traces:

> IoReceiver - localhost/127.0.0.1:5672 2009-07-02 15:59:53,160 DEBUG 
> [apache.qpid.transport.Connection] connection closed: conn:194df86
> Exception in thread "main" 
> org.apache.qpid.transport.ProtocolVersionException: version mismatch: 0-9
>        at 
> org.apache.qpid.transport.ProtocolVersionException.rethrow(ProtocolVersionException.java:59)
>        at org.apache.qpid.transport.Connection.connect(Connection.java:202)
>        at org.apache.qpid.transport.Connection.connect(Connection.java:167)
>        at 
> com.airbus.fsang.test.amqp.sender.SenderMain.main(SenderMain.java:61)

> My client code is the following:
>
> -----------------------------------------------------------------------------------------
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.sender;
>
>
> import org.apache.qpid.transport.Connection;
> import org.apache.qpid.transport.DeliveryProperties;
> import org.apache.qpid.transport.Header;
> import org.apache.qpid.transport.MessageAcceptMode;
> import org.apache.qpid.transport.MessageAcquireMode;
> import org.apache.qpid.transport.Session;

> So, as you can see in the client traces,  AMQP.1 0-10 is sent by the client 
> to the broker, which is
> normal according to the code of the connect method of the Connection class 
> (new ProtocolHeader(1, 0, 10)).
> I do not see any attempt of negociation...
>
> Maybe all this details could help to find the problem.

You're using the 0-10 native Java API, which only talks 0-10. If you
use the JMS API it will negotiate protocol versions. Have a look in
client/example/src/main/java/org/apache/qpid/example/publisher/Publisher.java
for a simple JMS example that's roughly equivalent to what you have.

Thanks,

- Aidan
-- 
Apache Qpid - AMQP, JMS, other messaging love http://qpid.apache.org
"A witty saying proves nothing" - Voltaire

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to