« Return to Thread: BTM Spring ActiveMQ number of consumers keeps increasing
Hi Mark,
unfortunately we did not solve our problem with BTM and AMQ. We were testing BTM because of issues with Atomikos and AMQ. In the end we decided to go with no XA transactions and deal with any extra work required in our own code.
To be honest I think that this has worked out better for us.
Sorry I cannot be of help :<
JamesMarkFletcher wrote:Hello James,
Sorry to restart an old thread. We're running into the same issues in a similar environment. The number of consumers goes up every second and the messages are getting stuck in the queue without being passed onto the Spring Message Handlers. Were you able to figure out what was the problem? Your response will be much appreciated.
Thanks.James Black wrote:Hello,
we are currently testing BTM and our having some issues.
Basically the number of consumers on the ActiveMQ queue keeps going up and up each second.
Our concurrency is set to 5-10 for our DefaultMessageListener.
What we are using:
Spring 3.0.5
Hibernate 3.6.2
ActiveMQ 5.5.0
BTM 2.1.0
I have configured everything as per the BTM docs.
<bean id="txManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager" ref="btmTransactionManager" />
<property name="userTransaction" ref="btmTransactionManager" />
</bean>
<bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices">
<property name="serverId" value="spring-api-btm" />
</bean>
<bean id="btmTransactionManager" factory-method="getTransactionManager"
class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig" destroy-method="shutdown" />
<bean id="entityManagerFactory"
depends-on="btmConfig"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceUnitName" value="platformEntityManager" />
<property name="dataSource" ref="dataSource" />
</bean>
I left out the data source config but it is the correct PoolingDataSource, now the JMS stuff.
<bean id="btmConnectionFactory"
class="bitronix.tm.resource.jms.PoolingConnectionFactory"
init-method="init" destroy-method="close">
<property name="className" value="org.apache.activemq.ActiveMQXAConnectionFactory" />
<property name="uniqueName" value="XAJMS" />
<property name="minPoolSize" value="40" />
<property name="maxPoolSize" value="40" />
<property name="driverProperties">
<props>
<prop key="brokerURL">tcp://localhost:61616</prop>
</props>
</property>
</bean>
<bean id="MessageListenerAdapter1" -->
class="org.springframework.jms.listener.adapter.MessageListenerAdapter">
<property name="delegate" ref="targetEntity" />
<property name="defaultListenerMethod" value="doStuff" />
<property name="messageConverter" ref="MyMessageConverter" />
</bean>
<bean id="MessageListenerContainer1"
class="org.springframework.jms.listener.DefaultMessageListenerContainer"
depends-on="txManager">
<property name="connectionFactory" ref="btmConnectionFactory"/>
<property name="destination" ref="jmsQueue1"/>
<property name="messageListener" ref="MessageListenerAdapter1" />
<property name="concurrency" value="5-10" />
<property name="transactionManager" ref="txManager" />
<property name="sessionTransacted" value="true" />
<property name="clientId" value="LIST1" />
</bean>
Any help much appreciated, if you fix it I will send you beer tokens through Paypal :>
James
« Return to Thread: BTM Spring ActiveMQ number of consumers keeps increasing
| Free embeddable forum powered by Nabble | Forum Help |