I have one question regarding JMS in Camel.
So I’m using JMS provided by some firm. But this JMS implementation does not provide Pooled Connection Factory.
So does camel has default pooled connection implementation?
Or it do smth trivial like:
1) Open connection
2) Open Session
3) Read/Write message
4) Close Session
5) Close connection
Because if believe my logs camel works like I mention in second case.
Thanks.
Camel pretty much uses JmsTemplate (from Spring Framework) for sending messages.
ActiveMQs thoughts of JmsTemplate
Essentially, you are true for the “producing” scenario, unless the underlying Jms provider features a pooling Connection Factory. This is usually the case if you run Spring or Camel inside App Servers.
If you set up something like
Then one or more on going consumers will be active, not destroying the session for each message (only commiting the message if you set transactions up). There is also a possiblity to pool the response listener for JMS request/response. Refer to camel.apache.org/jms for info.
But you are right, if you have a remote (non pooling) JMS provider and fires of frequent outgoing messages from Camel, this could be somewhat of a performance issue.