activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xuloo <tre...@xuloo.cc>
Subject messages dropped/ignored - consumers take an age to become free
Date Wed, 10 Apr 2013 14:30:48 GMT
I have ActiveMQ setup via a camel route and i'm consuming messages from a
queue. 

My problem is, if i only have 1 consumer that consumer will only consume 1
message every 30 seconds to a minute or so. 

If i setup up more concurrent consumers then each consumer will consume a
message until each consumer is consuming, then any messages that come in are
dropped until a consumer becomes free. 

Messages are coming in at an average rate of 1 every second, so in order not
to drop any messages i need a ton of threads. 

Is there a configuration item(s) i need to set to get this issue resolved.
Even with a route like this: 

from("activemq:topic-name").to("stream:out"); 

the consumers are bound up for anything up to a minute - i'd assumed they'd
just become free straight away. 

btw, my configuration currently looks like this: 

context = new DefaultCamelContext(); 
        
<code>                                
ActiveMQComponent amqComp = ActiveMQComponent.activeMQComponent(); 
                                        
ActiveMQConnectionFactory amqcf = new
ActiveMQConnectionFactory(ACTIVEMQ_ENDPOINT_URL); 
                                        
PooledConnectionFactory pcf = new PooledConnectionFactory(); 
pcf.setMaxConnections(10); 
pcf.setConnectionFactory(amqcf); 
                                        
JmsConfiguration config = new JmsConfiguration(); 
config.setConnectionFactory(pcf); 
config.setConcurrentConsumers(20); 
config.setAsyncConsumer(true); 
                                        
amqComp.setConfiguration(config); 
                                        
context.addComponent("activemq", amqComp); 
                                        
RouteBuilder routes = new RouteBuilder() { 
                                                
    @Override 
    public void configure() throws Exception { 
                
        from("activemq:topic-name") 
        .to("stream:out"); 
    } 
}; 

context.addRoutes(routes); 
context.start(); 
</code>



--
View this message in context: http://activemq.2283324.n4.nabble.com/messages-dropped-ignored-consumers-take-an-age-to-become-free-tp4665811.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message