[rabbitmq-discuss] Fwd: Debugging of Connection.class

Ben Hood 0x6e6562 at gmail.com
Tue Sep 2 19:18:33 BST 2008


---------- Forwarded message ----------
From: Ben Hood <0x6e6562 at gmail.com>
Date: Tue, Sep 2, 2008 at 2:04 PM
Subject: Re: [rabbitmq-discuss] Debugging of Connection.class
To: Pete Kay <petedao at gmail.com>
Cc: rabbitmq <rabbitmq-discuss at lists.rabbitmq.com>


Anne,

On Tue, Sep 2, 2008 at 1:31 AM, Pete Kay <petedao at gmail.com> wrote:
> The correct bytes were written to the delegate.writeByptes().
>
> Using ngrep, I see that the Flex client sends much less data to the server
> than the Java Client:
>
>
> ===========================Flex Client ===============================
>
> debian:/home/anne# ngrep  port 5672
> interface: eth0 (192.168.1.0/255.255.255.0)
> filter: (ip or ip6) and ( port 5672 )
> ########
> T 192.168.1.100:58513 -> 192.168.1.104:5672 [AP]
>   AMQP....
> ##
> T 192.168.1.104:5672 -> 192.168.1.100:58513 [AP]
>   ......
> ...........productS....RabbitMQ.versionS....1.4.0.platformS....Erlan
>   g/OTP.copyrightS...gCopyright (C) 2007-2008 LShift Ltd., Cohesive
> Financial
>    Technologies LLC., and Rabbit Technologies Ltd..informationS...5Licensed
> u
>   nder the MPL.  See http://www.rabbitmq.com/....PLAIN AMQPLAIN....en_US.
> #####

So the broker is actually receiving the header. It then sends the
client the Start command and waits for the client's response - in this
case for a long time :-(

OK, now you need to debug into the command exchange that creates an
AMQP connection between the client and the broker. From the client's
perspective, the flow looks like this:

1. Receive connection.Start
2. Send connection.StartOk
3. Receive connection.Tune
4. Send connection.TuneOk
5. Send connection.Open
6. Receive connection.OpenOk

This is handled in the ConnectionStateHandler class, and the event
handling in this class is fairly well documented.

Look at the the onStart function.

HTH,

Ben




More information about the rabbitmq-discuss mailing list