camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: [FTP + ConsumerTemplate] Threads remaining alive
Date Fri, 09 Mar 2012 09:23:04 GMT
CamelContext has API to remove endpoint(s). You can use that.

On Fri, Mar 9, 2012 at 10:15 AM, Aida <> 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 -
> 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:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Twitter: davsclaus, fusenews
Author of Camel in Action:

View raw message