Hi Pieter,

Pieter de Zwart <pdezwart at rubiconproject.com> writes:
Thanks for the pointer. I fixed that particular item, but as predicted, it
did not resolve the issue. With a fresh perspective I dug in some more,
and figured out that the culprit was calling amqp_basic_ack when no
message was consumed. Somehow that created the situation whereby the next
call to amqp_basic_qos got stuck.
I had a go at reproducing this from C code, with no luck so far. See
If I write some very basic C code that replicates this behavior ? la
rabbitmq-c/examples, do you think you can help me figure out what the hell
im doing wrong? =)
Yes please.

Another thing that might help understand the cause is to use the tracer
provuided with the rabbitmq java client to see what the client and
server are saying to each other. See

Here's the relevant part of the tracer output for my test program:

1320847892203: <Tracer-3> ch#1 -> {#method<basic.ack>(delivery-tagf6, multipleúlse),null,""}
1320847892203: <Tracer-3> ch#0 -> {#method<basic.qos>(prefetch-size=0, prefetch-count=1, globalúlse),null,""}
1320847892241: <Tracer-3> ch#1 <- {#method<channel.close>(reply-code@6, reply-text=PRECONDITION_FAILED - unknown delivery tag 666, class-id`, method-id€),null,""}
1320847892242: <Tracer-3> ch#0 <- {#method<connection.close>(reply-codeP4, reply-text=CHANNEL_ERROR - unexpected method in connection state running, class-id`, method-id),null,""}


- My client program acks with a non-existent delivery tag.

- Before the server responds to that, the client sends the basic.qos

- Because of the delivery tag issue, the server sends a channel.close to
signal the channel exception.

- The server now processes the basic.qos, and because the channel was in
the wrong state (it is expecting a close-ok from the client), it
signals a connection-level exception.

In my client program, the amqp_basic_qos call returns NULL when the
channel.close is received, to signal the error. The details of that
error are available by calling amqp_get_rpc_reply on the connection.


David Wragg
Staff Engineer, RabbitMQ
VMware, Inc.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 10 | next ›
Discussion Overview
grouprabbitmq-discuss @
postedNov 8, '11 at 2:35a
activeNov 10, '11 at 12:34a



site design / logo © 2022 Grokbase