On Tue, Sep 25, 2012 at 3:22 PM, edub <[email protected]> wrote:
> Hi Claus, I'm using the ActiveMQ connection factory:
>
>         <bean id="amq-cf" 
> class="org.apache.activemq.ActiveMQConnectionFactory">
>                 <property name="brokerURL"
>                         
> value="failover:(nio+ssl://host1,nio+ssl://host2.....8)" />
>                 <property name="userName" value="${activemq.username}" />
>                 <property name="password" value="${activemq.password}" />
>         </bean>
>
>
>         <bean id="amq-pcf" 
> class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
>                 <property name="connectionFactory" ref="amq-cf" />
>                 <property name="maxConnections" value="8" />
>                 <property name="maximumActive" value="500" />
>         </bean>
>

Yeah the activemq pool will eager use the max connection if possible.
So if you have set it to 8, then the pool creates 8 live connections.
And those connections is then round robin with clients on demand.
And that applies for both consumers and producers.

In the future, eg post 5.7.0 release, we may improve the AMQ pool, to
have a more elastic strategy. So on low usages it may not eagerly
create all the live connections. But more on demand scale up and down
depending on load.




>         <bean id="amq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>                 <property name="connectionFactory" ref="amq-pcf" />
>                 <property name="transacted" value="true" />
>                 <property name="cacheLevelName" value="CACHE_CONSUMER" />
>         </bean>
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Validating-Connection-Pools-and-Counting-of-Connections-tp4656868p4656933.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to