You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Gary Tully <ga...@gmail.com> on 2009/03/20 14:00:39 UTC

Re: ActiveMQ producer/consumer hangs when on of the consumer didn't respond

Prefetch <http://activemq.apache.org/what-is-the-prefetch-limit-for.html> is
the problem with pooling consumers.  A consumers pre-fetched messages, when
that consumer is in a pool, may stay there till the pool is closed and will
not be available to other consumers.

2009/3/20 ashoknan <as...@chase.com>

>
> Am i not supposed to use PooledConnectionFactory for consuming messages.See
> the below Java Doc
>
> http://activemq.apache.org/maven/act...onFactory.html
>
>
> A JMS provider which pools Connection, Session and MessageProducer
> instances
> so it can be used with tools like Spring's JmsTemplate. NOTE this
> implementation is only intended for use when sending messages. It does not
> deal with pooling of consumers; for that look at a library like Jencks such
> as in this example
> I am not sure whether this is outdated.
>
> Please let me know if anyone faced this issue before
> --
> View this message in context:
> http://www.nabble.com/ActiveMQ-producer-consumer-hangs-when-on-of-the-consumer-didn%27t-respond-tp22586789p22614510.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>


-- 
http://blog.garytully.com

Open Source SOA
http://FUSESource.com

Re: ActiveMQ producer/consumer hangs when on of the consumer didn't respond

Posted by ashoknan <as...@chase.com>.
Thanks Gary for your response..We have a prefetch of
10..jms.prefetchPolicy.all=10. 

The thing which i am not sure ,why when one of the Consumer got the stuck in
the smtp response other consumer for the same selector is stuck.(I have 5
Conusmer for the same selector). Not only the consumer got stuck the entire
producer/consumer is stuck(Attachment has thread stack).  See the queue stat
when the  entire producer/consumer is stuck.
queueSize=20548
memoryPercentUsage=100
memoryUsagePortion=1.0
memoryLimit=67108864
enqueueCount=400720
dequeueCount=380172
inFlightCount=10
maxEnqueueTime=227302
minEnqueueTime=1
averageEnqueueTime=32840.18067399298
consumerCount=8
producerCount=0
isProducerFlowControl=true


Is it because that particular consumer is holding the shared connection?

Also i am thinking whether setting the SMTP timeout will avoid the thread
getting stuck forever and it may not block the connection.

Does it make sense?


Gary Tully wrote:
> 
> Prefetch <http://activemq.apache.org/what-is-the-prefetch-limit-for.html>
> is
> the problem with pooling consumers.  A consumers pre-fetched messages,
> when
> that consumer is in a pool, may stay there till the pool is closed and
> will
> not be available to other consumers.
> 
> 2009/3/20 ashoknan <as...@chase.com>
> 
>>
>> Am i not supposed to use PooledConnectionFactory for consuming
>> messages.See
>> the below Java Doc
>>
>> http://activemq.apache.org/maven/act...onFactory.html
>>
>>
>> A JMS provider which pools Connection, Session and MessageProducer
>> instances
>> so it can be used with tools like Spring's JmsTemplate. NOTE this
>> implementation is only intended for use when sending messages. It does
>> not
>> deal with pooling of consumers; for that look at a library like Jencks
>> such
>> as in this example
>> I am not sure whether this is outdated.
>>
>> Please let me know if anyone faced this issue before
>> --
>> View this message in context:
>> http://www.nabble.com/ActiveMQ-producer-consumer-hangs-when-on-of-the-consumer-didn%27t-respond-tp22586789p22614510.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source SOA
> http://FUSESource.com
> 
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-producer-consumer-hangs-when-on-of-the-consumer-didn%27t-respond-tp22586789p22621769.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.