activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <>
Subject Re: Broker concurrency and connection pooling in amq 5
Date Thu, 07 Feb 2008 08:23:46 GMT

On Feb 7, 2008, at 7:31 AM, Jason Rosenberg wrote:

> I was reading some old discussion threads on connection pooling.   
> There seems
> to be some conflicting information, specifically whether it's a good  
> idea to
> pool connections.
> I have been using the jencks-amqpool package for pooling connections  
> (and
> also trying the pool package within activemq-core).
> In looking at this article:
> It states:
> "However one area to be careful of is currently each connection's
> commands are processed by a single thread on the broker side; so for
> relatively slow operations like durable producers you won't get much
> concurrency on the broker side (Guillaume hit this recently AFAIK on
> ServiceMix). So you might want to have many connections too so that
> you can have completely async broker side processing of separate
> producers. Though we should allow a thread pool to be used for
> different logical sessions on the broker side to avoid the client
> having to worry about that. "
> This is why I've been using the connection pooling stuff.
> Is this still an issue in amq 5, is the broker still single-threaded  
> when
> processing each connection?
Yes - some stateful operations require a response from the broker -  
these need to be single threaded. The ConnectionPool is there to  
prevent connections being open/closed unnecessarily by a framework -  
such as spring
> Also, I've been using Spring's JmsTemplate for sending, and
> DefaultMessageListenerContainer for consuming messages (in both  
> cases using
> a PooledConnectionFactory for connections)....Is this a recommended
> approach?

Yes - its a common usage scenario ..
> The Spring api's seemed a whole lot cleaner than the activemq-ra/ 
> jencks MDB
> POJO stuff....
The spring API's came after the activemq-ra/jenks stuff - I'd be  
surprised if it wasn't cleaner!
> Jason
> -- 
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


Rob -Enterprise Open Integration

View raw message