pythonee
pythonee

Reputation: 924

What is the difference between activemqconnectionfactory and pooledconnectionfactory?

As the title said, What is their difference and how to make a choice? I wonder is there something same as each other? If I want to make a keep-alive connection? That is said once I connect to activemq server, I can using the connection to send/receive message whenever I want. I think I can call it daemonProducer or daemonConsumer. Can activemq implement this?

Upvotes: 2

Views: 3857

Answers (1)

Tim Bish
Tim Bish

Reputation: 18356

The ActiveMQConnectionFactory creates ActiveMQ Connections. The PooledConnectionFactory pools Connections. If you only need to create one Connection and keep it around for a long time you don't need to pool. If you tend to create many Connection instances over time then Pooling is better as connecting is a heavy operation and can be a performance bottleneck.

Upvotes: 3

Related Questions