[rabbitmq-discuss] Rabbitmq 2.5-2.6.1 java hanging on close of connection

Simon MacMullen simon at rabbitmq.com
Mon Nov 28 16:05:59 GMT 2011


On 21/11/11 16:10, Benjamin Bennett wrote:
> Our application is using the CachingConnectionFactory, Spring
> Integration AMQP .
> The way this is happening is just by applying the @DirtiesContext in
> our unit test , that we need to reload the context, at that time the
> channel close and connection close are closed in different threads.
> The BlockingQueueConsumer is the one that end ups doing the channel
> closes but the CachingConnectionFactory actually  does the closes .
>
>
> The stacktraces have no other threads running except spring-amqp
> threads BlockingQueueConsumer and CachingConnectionFactory.

I'm afraid I can't really comment on spring-amqp - I don't know if Dave can?

But for the purpose of your tests maybe you could work around this by 
not closing the channels at all?

> My only comment about attracting attention it is a race condition ,
> and race conditions are the most painful bugs to have to deal with.

Oh, absolutely.

> On my dev box I have only seen the issue one time in 200 runs that ran
> over night.
> On our test windows 7 vms it happens 50% of the time, sample size was 40 runs.
> On our windows xp test vms it has never happened.
>
> In our production we get a "The service failed to close in timely
> manner" and doesn't shut down.
>
> Finally if you are fixing it in the server , what about the previous
> versions? I don't even think spring-amqp has migrated to 2.7 series
> java client because it is backwards incompatible.

You don't need to use the same versions of client and server - just 
upgrading the server should be fine.

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list