activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Sharma <gaurav.cs.sha...@gmail.com>
Subject Re: PooledConnectionFactory + Failover Transport combination
Date Fri, 27 Jul 2012 10:26:40 GMT
Dejan - thanks for the detailed explanation. Based on this, I went back and
figured the folly.. I misread the maximumActive to mean the connection
limit rather than the session-count per connection. My bad. I am upping the
maxConnections now. Also, based on your tweaks in 5.7 (thanks for the
excellent blog post), for v5.6 users like me, to simulate the same 1000
connections (thread-pool upper-bound) per client, I can come up with one of
the combinations on the pooled conexn factory like:
  maxActive(2) X maximumConnections(500)
  maxActive(4) X maximumConnections(250)

That will keep the upper bound to a 1000 threads in the pool with the
assumption that there's just a single user of the factory and thus the size
of LinkedList<ConnectionPool> never goes beyond 1000, right?


On Fri, Jul 27, 2012 at 3:15 AM, Dejan Bosanac <dejan@nighttale.net> wrote:

> Hi,
>
> the pooled connection factory will try to create maxConnections
> (default 1) and then reuse them from the pool. The process of
> connections creating (failover and randomize) is not related to the
> pool at all. With failover in case, the client (and the pool) will not
> even see host1 connection problem as transport itself will reconnect
> to host2.
>
>
> Regards
> --
> Dejan Bosanac
> Senior Software Engineer | FuseSource Corp.
> dejanb@fusesource.com | fusesource.com
> skype: dejan.bosanac | twitter: @dejanb
> blog: http://www.nighttale.net
> ActiveMQ in Action: http://www.manning.com/snyder/
>
>
> On Fri, Jul 27, 2012 at 12:16 AM, Gaurav Sharma
> <gaurav.cs.sharma@gmail.com> wrote:
> > It seems like with a failover transport configuration
> > (failover:(nio:host1:port1,nio:host2:port2)?randomize=false) and a
> > PooledConnectionFactory, the client-side still tries to create a new
> > connection per thread instead of fetching from the pool of connections.
> > With 'randomize' flag turned off, I would think that the pool can keep
> > connections to the primary broker node, no? Then, if host1 goes down,
> drain
> > the pool and fill it up with host2 connections upto the maxActive limit.
> Is
> > that how it is supposed to work or am I expecting too much intelligence
> in
> > the pooled conexn factory?
> >
> > -gaurav
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message