Problem with JMS Component with PooledConnectionFactory

View: New views
5 Messages — Rating Filter:   Alert me  

Problem with JMS Component with PooledConnectionFactory

by m.s. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Re: Problem with JMS Component with PooledConnectionFactory

by m.s. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: Problem with JMS Component with PooledConnectionFactory

by deckerego :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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?

Re: Problem with JMS Component with PooledConnectionFactory

by Claus Ibsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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<john.ellis@...> 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

by m.s. :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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...