CamelContext has API to remove endpoint(s). You can use that.
On Fri, Mar 9, 2012 at 10:15 AM, Aida <[email protected]> wrote: > Hi, > > First of all, thanks for the quick response. > > I will try to explain with more details what I am doing: > 1) I build the endpoint uri to retrieve the file from the FTP server. Each > day, the file has a different name (based on date), so the endpoint has to > be created dynamically. > 2) Save the retrieved file by sending the exchange to a local directory > (using a file endpoint). > 3) Finally, I done the UoW on the original retrieved exchange. > > I am using camel 2.9.0. > > Here is my theory: > > Each file has a different name (is based on the current date time) so, for > each file I have to read, I have to build a different endpoint uri. > > I think that the alive threads are these endpoints, because with JConsole I > can see lots of threads with this “name”: > > Name: Camel (processesCamelContext) thread #22 - > ftp://ftp_user@test_host.com:21/readFileDir > State: TIMED_WAITING on > java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject@4279f121 > Total blocked: 4 Total waited: 942 > > When calling the “consumerTemplate.receive(endpointUri)”, a different > Endpoint is created for each file, and this endpoint is added to the > registry and is never removed (calling the “doneUoW” seem has no effect). > > I also try to done the UoW before sending the exchange to the file endpoint > but the alive threads are still there. > > makes it sense for you or I’m missing something? > > If it is correct, Is there any way to remove these created endpoints? Maybe > using placeholders for the properties (host, password, filename…) I can > avoid to create a different endpoint each time? (I can live with one thread > living always, but no one for each read) > > Thanks for your help > > -- > View this message in context: > http://camel.465427.n5.nabble.com/FTP-ConsumerTemplate-Threads-remaining-alive-tp5548338p5549997.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
