[rabbitmq-discuss] Garbage Collection Problem in Consumer
aquino.gustavo at gmail.com
Tue Feb 2 11:31:50 GMT 2010
You can't control when your GC will run, if you declare this objects into
loop and don't are using hash tables or maps to reutilize it, so it will
be eligible to GC automatically, because your life cycle over in next loop.
Today I have a consumer in Java consuming about 1.000 m/s and never used
more than 15Mb and this objects never go throw eden memory, if you don't
forward this objects created inside consumer loop, this objects will be
automatic eligible for GC but GC don't run immediately you need to wait.
Can you post your consumer code ?
On Tue, Feb 2, 2010 at 3:48 AM, Seema Biradar <seemasbiradar at gmail.com>wrote:
> Hi All,
> i tried the rabbit MQ with Producer and Consumer Program.
> in Consumer side i am getting the all the Message, but the following
> are created for each message and not garbage collected immediately after
> *in Producer.java
> used basic publish as shown below.
> channel.basicPublish(exchangeName, routingKey, true, false,
> MessageProperties.PERSISTENT_TEXT_PLAIN, bao.toByteArray()) ;
> channel.basicConsume(queueName, true, consumer);
> with no-acknowledgement *true*.
> Please let me know, how to make the above object eligible for garbage
> collection immediately after consuming.
> for Consumer program The Heap Memory allocated is more , as this is
> performace issue
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss