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.sha...@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 <jel...@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