activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gaurav Sharma <>
Subject Re: Connection to Broker within an Application Server
Date Thu, 19 Jul 2012 23:53:46 GMT
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 <> 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

View raw message