You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by dtjep <di...@sap.aphp.fr> on 2013/04/16 16:34:34 UTC
ftpConsumer still remain in threadpools
Hello,
I get file with uri :
ftp://directory?include=.*HPR&doneFileName=${file:name.noext}.OK&delete=true
Once I get the file, I read another one in a bean :
from(url)
...
.bean(classEnrich, "enrich")
...
In enrich, I read the third file named using (uri is modified to designate
the file) :
ConsumerTemplate consumer = this.camelContext.createConsumerTemplate();
Exchange resource = consumer.receive(uri, 5000);
if(null != resource){
-- Get the file content
consumer.doneUoW(resource);
}
consumer.stop();
As I read the file (they are get and treated and suppressed without
problem), I observe that ftpConsumer are accumulated in threadpools and are
not freed. Threads are still waiting.
--
View this message in context: http://camel.465427.n5.nabble.com/ftpConsumer-still-remain-in-threadpools-tp5730976.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: ftpConsumer still remain in threadpools (seen in javaVisual
JVM>Beans>org.apache.camel>threadPools)
Posted by dtjep <di...@sap.aphp.fr>.
Hi,
Problem resolved by creating my own FtpConsumer.
Best regards,
Dtjep
--
View this message in context: http://camel.465427.n5.nabble.com/ftpConsumer-still-remain-in-threadpools-seen-in-javaVisual-JVM-Beans-org-apache-camel-threadPools-tp5730976p5732076.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: ftpConsumer still remain in threadpools (seen in javaVisual
JVM>Beans>org.apache.camel>threadPools)
Posted by dtjep <di...@sap.aphp.fr>.
Hi,
I have tried to create the consumer (createConsumerTemlate()) once at the
initialization of the enrich object
and keep it.
1. I tried with :
consumer.start()
consumer.receive(...)
consumer.stop()
The FtpConsumer() remains.
2. I trid without starting and stopping the consumer
// consumer.start()
consumer.receive(...)
//consumer.stop()
The same ...
It seems that when the uri is different a FtpConsumer is add and is not
suppressed.
Any idea ?
Thanks.
PS : I would like to apologize for my approximative English.
--
View this message in context: http://camel.465427.n5.nabble.com/ftpConsumer-still-remain-in-threadpools-seen-in-javaVisual-JVM-Beans-org-apache-camel-threadPools-tp5730976p5731337.html
Sent from the Camel - Users mailing list archive at Nabble.com.