activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Levy <jel...@gmail.com>
Subject Re: Connection to Broker within an Application Server
Date Fri, 20 Jul 2012 18:06:44 GMT
Thanks Gaurav-

I'll give the Pooled Factory a try.  What do you think about keeping once
instance of the connection factory around statically?  I've played with
async sending with mixed results.

Jeremy

On Thu, Jul 19, 2012 at 7:53 PM, Gaurav Sharma
<gaurav.cs.sharma@gmail.com>wrote:

> You might wanna use the PooledConnectionFactory wrapper with the
> ActiveMQConnectionFactory. That's what I switched to too. If you have a
> listener, you will have to leave the session open as well until msg
> delivery. I am using mysql as the msg-store and nio connector transport to
> the broker. Also, dep on your use case, try to turn on async sending if
> possible. There are many perf knobs that can be turned.
>
> Sent from my iPhone
>
> On Jul 19, 2012, at 16:32, Jeremy Levy <jelevy@gmail.com> wrote:
>
> > I suspect that the way I am currently producing messages within my
> > application server is wrong.
> >
> > We using JBoss 5.1 with a standalone ActiveMQ 5.6.0 broker.  In regards
> to
> > producing messages I am caching a static instance of the
> > ActiveMQConnectionFactory, everything else
> > Connection,Session,Destination,Producer is created with each message
> > created/sent.
> >
> > I've noticed that under very high message creation it appears as though
> > many connections to the broker are being created (as observed using
> > netstat) on the machine producing.
> >
> > It feel like there is no connection pooling being done.
> >
> > I could also not use ActiveMQConnectionFactory at all and create a JBoss
> /
> > ActiveMQ datasource and do the lookup via InitalContext etc..
> >
> > As I'm currently doing this is there connection pooling, should I be
> doing
> > this differently?
> >
> > Jeremy
>



-- 
Jeremy Levy

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