The reason for piling up of messages on the queue is due to single threaded
consumers connected through a non-pooled connection factory.

The first thing I would do is use jencks to set up a pooled connection
factory for ActiveMQ. An example of this is given below

        <jee:jndi-lookup id="transactionManager"
                jndi-name="javax.transaction.TransactionManager" />

        <amqpool:xa-pool xmlns:amqpool="http://jencks.org/amqpool/2.0";
                                id="xaConnectionFactory"
                                brokerURL="Your Broker URL"
                                transactionManager="#transactionManager" 
maxConnections="8" />

The next thing you need is to bump up your concurrent consumers. The queues
should be emptied as quickly as possible as shown below

             <jms:consumer service="gta:JMSConsumerService"
                                endpoint="gtaRequestReader"
                                targetService="gta:connectorRequestRecipients"
                                destinationName="gta.request"
                        connectionFactory="#connectionFactory" 
concurrentConsumers="8" />


This should take care of the issue.

Cheers,

Ashwin...


java programmer-2 wrote:
> 
> Hello,
> We have problem with performance - we use currently 3 service
> assemblies, which communicate each other. One of them is core system,
> two other are connectors & XML transformers which returns common
> object model data, from different webservices.
> Problem is that between core system and two other components we use
> ActiveMQ queue, and after logging some times we found that messages
> remains most of the request lifecycyle in that queue waiting for
> consuming. We have no idea currently what to check to solve that
> problem, maybe you can get us any hint?
> 
> We have defined queues for consumer & provider in component:
>       <jms:consumer service="gta:JMSConsumerService"
>                               endpoint="gtaRequestReader"
>                               targetService="gta:connectorRequestRecipients"
>                               destinationName="gta.request"
>                       connectionFactory="#connectionFactory" />
> 
>       <jms:consumer service="gta:JMSConsumerService"
>                               endpoint="gtaResponseReader"
>                               targetService="gta:jms"
>                               targetEndpoint="gtaConnectorResponseWriter"
>                               destinationName="gta.response"
>                       connectionFactory="#connectionFactory" />
>                               
>       <jms:provider service="gta:JMSProviderService"
>                               endpoint="gtaRequestWriter"
>                               destinationName="gta.request"
>                       connectionFactory="#connectionFactory" />
> 
>       <jms:provider service="gta:JMSProviderService"
>                               endpoint="gtaResponseWriter"
>                               destinationName="gta.response"
>                       connectionFactory="#connectionFactory" />
> 
>     <amq:connectionFactory id="connectionFactory"
> brokerURL="tcp://localhost:61616" />
> 
> and routing in camel as:
> something().to("jbi:endpoint:http://www.test.com/JMSProviderService/gtaRequestWriter";);
> from("jbi:endpoint:http://www.test.com/jms/gtaConnectorResponseWriter";).tosomethingelse()
> 
> Logged time is very huge between those two elements to and from, for
> the whole request time. Maybe there is need of some configuring how
> many elements should be consumed from queue in same time e.g. default
> is 1, so we have got sequencing order of consuming (one by one).
> 
> Best regards,
> Adrian
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Poor-performance-over-queues--tp20579184p20581977.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to