Reputation: 924
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
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