You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "m.s." <da...@arcor.de> on 2009/08/17 18:59:51 UTC

Problem with JMS Component with PooledConnectionFactory

Hi,

I am using Camel 2.0-M2 with the JMS Component and ActiveMQ. I had some
performance issues until I discovered the hint in the documentation and
switched to the PooledConnectionFactory. It is configured like this: 

  <bean id="jmsFactory"
class="org.apache.activemq.pool.PooledConnectionFactory"
destroy-method="stop">
    <property name="connectionFactory">
      <bean class="org.apache.activemq.ActiveMQConnectionFactory">
        <property name="brokerURL" value="tcp://localhost:61616"/>
      </bean>
    </property>
  </bean>

  <bean id="jms" class="org.apache.camel.component.jms.JmsComponent">
      <property name="connectionFactory" ref="jmsFactory"/>
  </bean>

The performance is much better now, but I have another problem. When I test
my application, I have a single queue from witch messages are not consumed.
At some point, it has 2110 pending messages and the application stops until
I purge the pending messages with the Web console.

I think it might be an issue with connection pooling and prefetching as
described here:
http://activemq.apache.org/what-is-the-prefetch-limit-for.html

With my configuration, is the PooledConnectionFactory only used for
Producers or also for Consumers?

Any help or useful hints on how to change my configuration is much
appreciated!

M.S.
-- 
View this message in context: http://www.nabble.com/Problem-with-JMS-Component-with-PooledConnectionFactory-tp25010464p25010464.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: Problem with JMS Component with PooledConnectionFactory

Posted by "m.s." <da...@arcor.de>.


Claus Ibsen-2 wrote:
> 
> Yeah try the AMQ component that is optimized for Camel + AMQ.
> http://camel.apache.org/activemq.html
> 

Thanks, your both right. With the AMQ component, the performance is even
slightly better than with the JMS component and the PooledConnectionFactory
and I don't have the other problems anymore. Should have tried it earlier...
-- 
View this message in context: http://www.nabble.com/Problem-with-JMS-Component-with-PooledConnectionFactory-tp25010464p25031538.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: Problem with JMS Component with PooledConnectionFactory

Posted by Claus Ibsen <cl...@gmail.com>.
Yeah try the AMQ component that is optimized for Camel + AMQ.
http://camel.apache.org/activemq.html



On Mon, Aug 17, 2009 at 8:03 PM, deckerego<jo...@gmail.com> wrote:
>
> I've experienced the same thing. Sometimes (and this isn't predictable) JMS
> production ceases entirely and messages just back up. This isn't related to
> load either - this can happen with near-zero load as well.
>
> Issue does not happen with the JMS template or Camel's vanilla ActiveMQ
> Component.
>
>
> m.s. wrote:
>>
>> There is also another issue, but I am not sure if it is really related to
>> the PooledConnectionFactory. But I think since I use the
>> PooledConnectionFactory, the undeployment of my web application takes much
>> longer and sometimes it hangs completly. Has anyone experienced something
>> similar?
>>
>
> --
> View this message in context: http://www.nabble.com/Problem-with-JMS-Component-with-PooledConnectionFactory-tp25010464p25011454.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: Problem with JMS Component with PooledConnectionFactory

Posted by deckerego <jo...@gmail.com>.
I've experienced the same thing. Sometimes (and this isn't predictable) JMS
production ceases entirely and messages just back up. This isn't related to
load either - this can happen with near-zero load as well.

Issue does not happen with the JMS template or Camel's vanilla ActiveMQ
Component.


m.s. wrote:
> 
> There is also another issue, but I am not sure if it is really related to
> the PooledConnectionFactory. But I think since I use the
> PooledConnectionFactory, the undeployment of my web application takes much
> longer and sometimes it hangs completly. Has anyone experienced something
> similar?
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-JMS-Component-with-PooledConnectionFactory-tp25010464p25011454.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: Problem with JMS Component with PooledConnectionFactory

Posted by "m.s." <da...@arcor.de>.
There is also another issue, but I am not sure if it is really related to the
PooledConnectionFactory. But I think since I use the
PooledConnectionFactory, the undeployment of my web application takes much
longer and sometimes it hangs completly. Has anyone experienced something
similar?
-- 
View this message in context: http://www.nabble.com/Problem-with-JMS-Component-with-PooledConnectionFactory-tp25010464p25010949.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.