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:
I have configured everything as per the BTM docs.
<property name="transactionManager" ref="btmTransactionManager" />
<property name="userTransaction" ref="btmTransactionManager" />
<bean id="btmConfig" factory-method="getConfiguration" class="bitronix.tm.TransactionManagerServices">
<property name="serverId" value="spring-api-btm" />
<bean id="btmTransactionManager" factory-method="getTransactionManager"
class="bitronix.tm.TransactionManagerServices" depends-on="btmConfig" destroy-method="shutdown" />
<property name="persistenceUnitName" value="platformEntityManager" />
<property name="dataSource" ref="dataSource" />
I left out the data source config but it is the correct PoolingDataSource, now the JMS stuff.
<property name="className" value="org.apache.activemq.ActiveMQXAConnectionFactory" />
<property name="uniqueName" value="XAJMS" />
<property name="minPoolSize" value="40" />
<property name="maxPoolSize" value="40" />
<bean id="MessageListenerAdapter1" -->
<property name="delegate" ref="targetEntity" />
<property name="defaultListenerMethod" value="doStuff" />
<property name="messageConverter" ref="MyMessageConverter" />
<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" />
Any help much appreciated, if you fix it I will send you beer tokens through Paypal :>
I've seen quite a few quirks with ActiveMQ, especially when running with XA. I actually discourage you from trying to integrate ActiveMQ XA support with BTM. For instance, see .
Can you try with LRC? The related issue in BTM has a configuration snippet 
Is there any reason why you want 5 message listeners at all time? If you don't need to ramp up very fast, you can use 1-10 which will only use one listener when your queue is empty. The drawback of course is that it might take some time before you get up to 10 threads if a lot of messages are being sent in a short period of time.
If ActiveMQ is not a strong choice for you, I also encourage you to try HornetQ . It has been working quite well for us
On Fri, Jun 3, 2011 at 1:31 PM, James Black <[hidden email]> wrote:
On Sat, Jun 4, 2011 at 9:55 AM, Stephane Nicoll
<[hidden email]> wrote:
> I've seen quite a few quirks with ActiveMQ, especially when running with XA.
> I actually discourage you from trying to integrate ActiveMQ XA support with
> BTM. For instance, see .
I'd also like to generally caution you about using ActiveMQ, I know of a project
where it was used and they had serious problems with it. Since I wasn't directly
involved, I cannot say what they were exactly, but they seemed to be
YMMV, but it seems they were not the only one having problems:
I'm not saying that you cannot use AMQ, but if you are building are
heavy-traffic application, you should be aware that you will run into
problems. You should
at least invest some time evaluating alternatives.
Just my 2 cents
To unsubscribe from this list, please visit:
In reply to this post by James Black
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.
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 :<
Thank you, James. I appreciate your response. We had some problems with Atomikos too with the database that we were using. :-)
As said earlier, ActiveMQ's XA support is very poor and should be avoided if you can.
LRC might be the easiest thing to do, otherwise your options are:
- tune the Spring DefaultMessageListenerContainer (it caching can confuse ActiveMQ a lot) and maybe disable BTM PoolingDataSource's cacheProducersConsumers property
- use a different JMS server
- avoid XA.
2011/10/5 MarkFletcher <[hidden email]>
|Free forum by Nabble||Edit this page|