camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Potential Memory Leak with Dynamic Routes Specified via RecipientList
Date Mon, 22 Feb 2010 17:20:35 GMT
HI

Yeah its a known issue with the recipent list. Its fixed in 2.3-SNAPSHOT.
https://issues.apache.org/activemq/browse/CAMEL-2484



On Mon, Feb 22, 2010 at 6:17 PM, J_Racker <john.madrid@rackspace.com> wrote:
>
> Hi,
>
> I'm seeing an issue when using an dynamic route specified via a recipient
> list.  I'm running Camel 2.1.0 and my route looks like the following:
>
> from(outQueue).to("bean:messageValidator").setHeader("CamelFileName",
> getFileNameXpath()).recipientList(getResponseEndpoint());
>
> where getResponseEndpoint() looks something like this:
>
> private Expression getResponseEndpoint() {
>        Expression rootDirectoryEndpoint =
> ExpressionBuilder.simpleExpression(getRootDirectoryEndpoint());
>        Expression tempFileOption =
> ExpressionBuilder.simpleExpression("?tempFileName=");
>        Expression tempFileName =
> FileLanguage.file("${file:onlyname.noext}.tmp");
>
>        Expression fileOptions = ExpressionBuilder.append(tempFileOption,
> tempFileName);
>
>        Expression fileEndpoint =
> ExpressionBuilder.append(rootDirectoryEndpoint, new
> XPathBuilder(MGMT_GROUP_XPATH));
>
>        return ExpressionBuilder.append(fileEndpoint, fileOptions);
>    }
>
> I'm trying to route the message to a file in a directory based on the
> evaluation of an xpath expression on the message itself.  This all works
> great.  The problem I'm seeing is with the MBean Server.
>
> When I profile my activeMQ broker that is running with YourKit, I see a
> giant hashmap start to grow with every message I send through this route
> with with at least one entry for each file.  The entries look like this:
>
> key  java.lang.String
> "context=myServer/camel,name="file:///myFile",type=endpoints"
> value  com.sun.jmx.mbeanserver.NamedObject
>
> Am I using the RecipientList incorrectly?  Is there some setting I can set
> to throw these references away once the route is complete?   Any help is
> appreciated.
>
> John Madrid
>
>
> --
> View this message in context: http://old.nabble.com/Potential-Memory-Leak-with-Dynamic-Routes-Specified-via-RecipientList-tp27690762p27690762.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message