If the threads are not being cleaned up, then it would seem that there
is a leak in the SshClient library - this is confirmed by the screenshot
of the threads that you attached on SO; they are all associated with
SshClient. Can you verify that the client is in fact shutting down by
set the logging level for org.apache.sshd.common.util to DEBUG?
As to the documentation around the ProducerTemplate and singletons,
absolutely. As they say, contributions are most welcome.
On 12/11/15 16:15, codan84 wrote:
I tried your suggestion:
ProducerTemplate producerTemplate =
camelContext.createProducerTemplate();
producerTemplate.start();
String response = producerTemplate.requestBody("ssh://....",
String.class);
producerTemplate.stop();
There is no difference. Still the number of threads grows.
I would disagree that this is not a bug. Especially with a Spring-Boot
application, where the app will usually run on a server forever, this is an
issue. It is unfortunate how Camel handles non-singleton endpoints, but it
should either be very well documented (bold, red etc), or a different
approach to non-singleton endpoints worked out.
--
View this message in context:
http://camel.465427.n5.nabble.com/Spring-Boot-Camel-producerTemplate-ssh-spawning-thousands-of-threads-tp5773741p5773755.html
Sent from the Camel - Users mailing list archive at Nabble.com.