You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jean-Yves LEBLEU <jl...@gmail.com> on 2007/10/01 15:14:23 UTC
Activemq-web Consumer close hangs
Hi all,
I am experimenting a strange problem using activemq-web module.
I have a web client using a topic and a producer producing messages at
a very fast rate.
>From time to time I reset the connection by relistening at the web
client side at the same topic.
After some resets the consumer hangs, and my producer run out of memory.
I removed the client.closeConsumer(destination) in the
MessageListenerServlet class and every things seems to work well
again.
if ("listen".equals(type))
{
Listener listener = getListener(request);
Map consumerIdMap = getConsumerIdMap(request);
//client.closeConsumer(destination); // drop
any existing consumer.
MessageAvailableConsumer consumer =
(MessageAvailableConsumer) client.getConsumer(destination);
consumer.setAvailableListener(listener);
consumerIdMap.put(consumer, message);
log.info("Subscribed: "+consumer+" to
"+destination+" id="+message);
}
The problem can easily be reproduced by making a javascript loop whick
listen to the same topic over and over again, and using a fast
producer on this topic.
Did any one had the same problems ?
When I trace the problem it seems that sometimes the consumer.close()
method hangs in the webclient class.
Thanks for any tips.
Jean-Yves