[rabbitmq-discuss] problems with amqpcpp and rabbit 2.0-2.4.1
David Hawthorne
dsrthorne at gmail.com
Fri Apr 29 01:47:13 BST 2011
I'm continuing to dig down into this, and have discovered the following:
1. amqpcpp doesn't work with versions 2.0, 2.2, or 2.4.1
2. the server is sending a AMQP_RESPONSE_SERVER_EXCEPTION back during the amqp_channel_open call in rabbitmq-c
3. the rabbitmq-c tools in the tools/ subdirectory all work fine
4. rabbitmq the server doesn't give any logging outside of starting and closing the TCP connection, and I can't find a way to enable more verbose logging
I'll keep digging to see if I can find more useful information.
from amqp.h:
typedef enum amqp_response_type_enum_ {
AMQP_RESPONSE_NONE = 0,
AMQP_RESPONSE_NORMAL,
AMQP_RESPONSE_LIBRARY_EXCEPTION,
AMQP_RESPONSE_SERVER_EXCEPTION
} amqp_response_type_enum;
from my test program:
0 [0x7f1033a7f750] DEBUG AMQP null - Making new connection to amqp server
2 [0x7f1033a7f750] DEBUG AMQP null - Logging into amqp server
5 [0x7f1033a7f750] DEBUG main null - creating queue foobar
5 [0x7f1033a7f750] DEBUG AMQP null - creating queue with name foobar
5 [0x7f1033a7f750] DEBUG AMQPQueue null - constructing new queue with channelNum 0 and name foobar
5 [0x7f1033a7f750] DEBUG AMQPQueue null - opening channel
amqp_simple_rpc_decoded reply type is 3 in amqp_simple_rpc_decoded in amqp_socket.c
5 [0x7f1033a7f750] DEBUG AMQPQueue null - amqp_channel_open returned null
On Apr 28, 2011, at 2:48 PM, David Hawthorne wrote:
> Here's another problem, this time using amqpcpp with 2.4.1:
>
> dhawth at u16$ ./example_get
> server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
>
> dhawth at u16$ ./example_consume
> server connection error 504, message: CHANNEL_ERROR - unexpected method in connection state running
>
> Server logs don't show anything other than connection open and close.
>
> This happens after the createQueue, and then queue->Declare lines.
>
>
> On Apr 28, 2011, at 9:38 AM, Pieter de Zwart wrote:
>
>> Upgrade to 2.*. Trust me. You do not want to deal with the 0-8/0-9-1
>> compatibility dance =)
>>
>> Pieter
>>
>>
>> On 4/28/11 5:55 AM, "David Wragg" <david at rabbitmq.com> wrote:
>>
>>> David Hawthorne <dhawth at 3crowd.com> writes:
>>>> I saw this, which indicates that rabbitmq-c should Just Work:
>>>>
>>>> http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-June/003858.html
>>>
>>> That email is quite old.
>>>
>>>> Note that I'm using the rabbitmq-cpp wrapper around it (I think it's called
>>>> amqpcpp officially).
>>>>
>>>> client sees:
>>>>
>>>> Expected 0x000A000A method frame on channel 0, got frame type 65
>>>> [...]
>>>>
>>>> Any help you can give on this would be greatly appreciated. I'm
>>>> testing against 1.6.0 because that's what apt-get gave me, but I'm not
>>>> averse to upgrading.
>>>
>>> You are using a version of the rabbitmq-c client that only talks
>>> AMQP-0.9.1 with a version of rabbitmq-server that only talks AMQP-0.8.
>>> The easiest route forward is to upgrade your servert to 2.0 or later.
>>
>
More information about the rabbitmq-discuss
mailing list