Hi all.
 
I am using the FTP component (Camel 2.9.0) and a Consumer Template for
reading files. The thing is that, while doing stress tests (reading 1100
files in parallel) and using the JConsole, I realised that there are one
thread per file that is not killed (in this case, 1100 threads remain
alive).
 
A little more information:
- Each file is different because I am trying to simulate a long running
production enviroment (in the “real world”, I have to read 20 differents
files per day, so I set up this scenario for 505 days))
- The consumer template is started before reading and stoped after:
            try{
                  //start the template
                  consumerTemplate.start();
                  if(timeout == 0){
                        dataExchange =
consumerTemplate.receiveNoWait(endpoint2Consume);
                  }
                  else{
                        dataExchange =
consumerTemplate.receive(endpoint2Consume, timeout);
                  }
            }catch (Exception e) {
                  //null the exchange to throw the exception after (dirty
trick, I know)
                  dataExchange = null;
            }
            finally{
                  //stops the template (release threads)
                  consumerTemplate.stop();
             }

I also "make the unit of work done":  consumerTemplate.doneUoW(dataExchange
);

 
I have been investigating both, the ftp component and the consumer template
usage but I'm not able to see where/what the problem is.
 
Thanks in advance.
 
   Aida.


--
View this message in context: 
http://camel.465427.n5.nabble.com/FTP-ConsumerTemplate-Threads-remaining-alive-tp5548338p5548338.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to