You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Michal <ca...@yahoo.com> on 2006/10/05 18:57:23 UTC
queue consumer - out of memory
I am connecting to activemq (inside service mix3.0 - so version 4.0.2) via
tcp.
I am consuming messages using jencks pooling.(Below settings for my client -
using spring).
Connection is indeed pooled - however, jms template on each receive() call
creates new session and consumer.
I think this causes the problem on the server. When I investigated the
problem using profiler I found out that linkedlist is getting bigger in
line:
org.apache.activemq.broker.region.PrefetchSubscription.add(MessageReference
node) (pending.addLast(node);)
Is it a problem with configuration? How can I force jencks to provide the
same session to jms template?
Please advise
===== spring file =======
<bean id="mybean" class="com.a">
<property name="jmsTemplate">
<bean class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory">
<ref local="jmsConnectionFactory" />
</property>
<property
name="defaultDestinationName"><value>queue/A</value></property>
<property name="pubSubDomain"><value>false</value></property>
<property name="receiveTimeout"><value>-1</value></property>
</bean>
</property>
</bean>
<bean id="transactionContextManager"
class="org.jencks.factory.TransactionContextManagerFactoryBean"/>
<bean id="geronimo"
class="org.jencks.factory.GeronimoTransactionManagerFactoryBean"/>
<bean id="geronimoTransactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="userTransaction" ref="geronimo" />
</bean>
<bean id="connectionManager"
class="org.jencks.factory.ConnectionManagerFactoryBean">
<property name="transactionSupport">
<bean
class="org.jencks.factory.NoTransactionFactoryBean" />
</property>
<property name="poolingSupport">
<bean
class="org.jencks.factory.SinglePoolFactoryBean">
<property name="maxSize" value="1"/>
<property name="minSize" value="1"/>
<property name="blockingTimeoutMilliseconds"
value="60"/>
<property name="idleTimeoutMinutes"
value="60"/>
<property name="matchOne" value="true"/>
<property name="matchAll" value="true"/>
<property name="selectOneAssumeMatch"
value="true"/>
</bean>
</property>
</bean>
<bean id="jmsManagedConnectionFactory"
class="org.apache.activemq.ra.ActiveMQManagedConnectionFactory">
<property name="resourceAdapter">
<bean class="org.apache.activemq.ra.ActiveMQResourceAdapter">
<property name="serverUrl" value="tcp://localhost:61616"/>
</bean>
</property>
<property name="queuePrefetch" value="1" />
<property name="inputStreamPrefetch" value="1" />
</bean>
<bean id="jmsConnectionFactory"
class="org.springframework.jca.support.LocalConnectionFactoryBean">
<property name="managedConnectionFactory"
ref="jmsManagedConnectionFactory"/>
<property name="connectionManager" ref="connectionManager"/>
</bean>
--
View this message in context: http://www.nabble.com/queue-consumer---out-of-memory-tf2390336.html#a6663827
Sent from the ActiveMQ - User mailing list archive at Nabble.com.