activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Thieme <activemq-us...@athieme.com>
Subject Client unable to receive messages (after some time) when using PooledConnectionFactory
Date Fri, 24 Feb 2006 17:24:05 GMT
Hello,

I am currently running with version 3.2.1, an embedded broker, with 
clients using the reliable protocol, and a pooled connection factory (all 
defined using Spring, if that makes a difference). After some time 
running, sending messages successfully, the producers (to a few queues) 
are still able to send messages, but the corresponding consumers are no 
longer able to receive. The call to receive returns null, and does not 
throw an Exception.

As a test, I switched to NOT use the pooled connection factory, and low 
and behold my tests ran to completion (i.e. consumers were able to receive 
all messages where before they would have failed).

The Spring configuration I am using is included below (both the pooled 
and non-pooled versions).

Incidentally, I added the "useAsyncSend" property to the connection 
factory in an attempt to speed things up and and ?keepAliveTime=-1 to my 
broker in an attempt to say "don't ever consider the connection to be 
dead". I don't know if either of these are relevant, used, etc. I'm open 
to other properties/options to make things more reliable (required) and 
perform as fast as possible (desired).

I see there was an update to 3.2.2; but, I don't see anything in the 
changelog that speaks to this type of problem.

Thanks in advance for any help.

Alex

<!-- working version -->

     <bean id="Jms.ConnectionFactory.Embedded"
           class="org.activemq.ActiveMQConnectionFactory"
           singleton="true"
           lazy-init="true">
         <property name="brokerURL" ref="Jms.BrokerUrl"/>
         <property name="useAsyncSend" value="true"/>
         <property name="useEmbeddedBroker" value="true"/>
     </bean>

     <!-- A connection factory, expects broker to be running already -->
     <bean id="Jms.ConnectionFactory"
           class="org.activemq.ActiveMQConnectionFactory"
           singleton="true"
           lazy-init="true">
         <property name="brokerURL" ref="Jms.BrokerUrl"/>
         <property name="useAsyncSend" value="true"/>
         <property name="useEmbeddedBroker" value="false"/>
     </bean>

<!-- Non-working version -->

     <!-- A connection factory, using the embedded broker -->
     <bean id="Jms.ConnectionFactory.Pooled.Embedded"
           class="org.activemq.pool.PooledConnectionFactory"
           singleton="true"
           lazy-init="true">
         <property name="connectionFactory">
             <bean class="org.activemq.ActiveMQConnectionFactory">
                 <property name="brokerURL" ref="Jms.BrokerUrl"/>
                 <property name="useAsyncSend" value="true"/>
                 <property name="useEmbeddedBroker" value="true"/>
             </bean>
         </property>
     </bean>

     <!-- A connection factory, expects broker to be running already -->
     <bean id="Jms.ConnectionFactory.Pooled"
           class="org.activemq.pool.PooledConnectionFactory"
           singleton="true"
           lazy-init="true">
         <property name="connectionFactory">
             <bean class="org.activemq.ActiveMQConnectionFactory">
                 <property name="brokerURL" ref="Jms.BrokerUrl"/>
                 <property name="useAsyncSend" value="true"/>
                 <property name="useEmbeddedBroker" value="false"/>
             </bean>
         </property>
     </bean>

Mime
View raw message