[rabbitmq-discuss] Delay delivering messages
michaelburns1 at gmail.com
Fri Sep 17 16:26:57 BST 2010
On Fri, Sep 17, 2010 at 4:13 PM, Vlad Alexandru Ionescu
<vlad at rabbitmq.com>wrote:
> So I understand that it is the consumer's connection that was hanging in
> I tried to reproduce your problem yesterday (killing off both consumer and
> producer apps), with no success.
> What version of Java are you using?
We're using Java 1.6.0_15. Our consumers are running on OS X 10.6.2
> By not having been shutdown cleanly... could it be possible, in your case,
> that the client has been disconnected from the network abruptly, in some
Dont think so - the main cause of the app not shutting cleanly is a
deployment script we have for our dev environments which kills our JVM if it
doesnt shutdown within a specified time period (because we are running in a
web container with multiple web apps sometimes it can take a couple of
seconds to successfully shutdown). Also it may be worth mentioning that our
consumer is on a different network to the RabbitMQ broker - the broker is
running at amazon on an EC2 instance, while the consumer runs on our
> The only situation I can think of when you can have stray connections (and
> would not be a bug) would be the case when the socket has been broken in
> some way without doing a TCP FIN. If the app is killed, the underlying OS
> takes care of closing all its FDs, including all sockets that were held by
> the app - so that shouldn't cause stray connections. But, for example, if
> the client machine is physically disconnected from the network, the broker
> has no way of knowing that and expects the client to continue consuming (but
> it doesn't). Until the TCP socket times out (could take 15 mins), the
> message would remain blocked in the queue, as it is reserved for the
> disconnected client (which didn't receive the message entirely and/or didn't
> get to ack).
Yes this make sense - if I see it happening again I'll try and wait to see
if the connection eventually times out.
> On 09/17/2010 03:56 PM, Michael Burns wrote:
> Just to add that I experienced the delay problem again - this time I
> checked the number of connections that were open and saw a stray connection
> was still hanging about. Upon manually killing this connection my message
> then came through.
> Any thoughts?
> (Again just to add that I'm not 100% sure our consumer app shutdown
> cleanly, it may have been killed before the connection could be closed our
> On Thu, Sep 16, 2010 at 1:39 PM, Michael Burns <michaelburns1 at gmail.com>wrote:
>> Hi Vlad,
>> We're using the Java client 1.8.1
>> On Thu, Sep 16, 2010 at 1:37 PM, Vlad Alexandru Ionescu <
>> vlad at rabbitmq.com> wrote:
>>>> I've noticed sometimes that there are extra connections hanging about on
>>>> the RabbitMQ broker (using rabbitmqctl list_connections).
>>> Michael, can you tell us which client(s) are you using?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss