← Back to team overview

txamqp-dev team mailing list archive

Re: 'headers' not in msg.content:

 

Hi Dan,

sorry for the slow reply, FluidDB has taken a lot of our time lately.

On Sat, Sep 5, 2009 at 9:23 PM, Dan Di Spaltro <dan.dispaltro@xxxxxxxxx> wrote:
> Well I think these two issues aren't as related as I thought.  The
> headers not in content happens when you:
>
> * have a publisher, send to a queue.
> * disconnect the publisher, make sure the queue is still alive aka, no
> auto_delete
> * send to the response queue, which no longer exists, and this happens.

Thanks for finding the steps to trigger the error, that's great! We
have seen this error occurring intermitently, but couldn't isolate it.
What you're describing makes a lot of sense, and I think the reason is
that both the client and the server set the immediate flag to True
when publishing a message.

When the server sends a response to a client that has disconnected
from the broker, or just deleted its queue (and thus messages become
unroutable), the server receives a basic_return_, but it's not
prepared to process it (as it can only handle incoming calls). There
are some solutions to that:

- remove the immediate flag from the server's transport, the problem
is that the server will not know if a response has been delivered
correctly
- add an empty dictionary as the headers attribute to the Content
class no matter what (whether there are headers or not)

> I do think the command_invalid thing is related to the aforementioned
> problem.  But I will have to investigate deeper.

Are you yielding all the deferreds (if using inlineCallbacks)? We
experienced some errors with frames received and sent out of order.
The other Dan :-) had the same problem we had some weeks ago:

https://lists.launchpad.net/txamqp-dev/msg00006.html

Cheers.



Follow ups

References