Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B211A972A for ; Fri, 30 Dec 2011 09:40:37 +0000 (UTC) Received: (qmail 59162 invoked by uid 500); 30 Dec 2011 09:40:37 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 58685 invoked by uid 500); 30 Dec 2011 09:40:31 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 58664 invoked by uid 99); 30 Dec 2011 09:40:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2011 09:40:29 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 216.139.236.26 is neither permitted nor denied by domain of prashanth.shivakumar@gmail.com) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2011 09:40:22 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RgYwT-0006ks-Vb for users@camel.apache.org; Fri, 30 Dec 2011 01:40:01 -0800 Date: Fri, 30 Dec 2011 01:40:01 -0800 (PST) From: suman To: users@camel.apache.org Message-ID: <1325238001973-5109713.post@n5.nabble.com> In-Reply-To: References: <1325180563182-5108206.post@n5.nabble.com> <4EFD18CB.4050703@gmail.com> Subject: Re: ProducerCache memory leak? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Guys Thanks for your reply. I do stop route using API.I call context.stopRoute() and context.removeRoute() using routeid. Here is my routebuilder.To be honest i have a Suspicion on "onException" DSL.Iam not so sure.Let me know what you guys think ===================================================================== public void startRoute(CamelContext context, final String name, final String eventId) throws Exception { context.addRoutes(new RouteBuilder() { @Override public void configure() throws Exception { onException(AddEventNotFoundException.class).handled(true) .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http4.HttpMethods.GET)) .recipientList(simple(liveEventUrlForOpenEvent, String.class)) .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD)) .setHeader(CacheConstants.CACHE_KEY, header("eventid")) .convertBodyTo(String.class, "UTF-8") .to("cache://LiveCache") .to("log:CACHEREFRESHEDFROMEXTERNALAPI?level=WARN"); onException(Throwable.class).handled(true).useOriginalMessage().to("log:com.unibet.dynaroutebuilder.DynamicRouteStarter?level=ERROR&showException=true&showCaughtException=true&showStackTrace=true"); this.getContext().getProperties().put(Exchange.LOG_DEBUG_BODY_STREAMS, "true"); this.getContext().getProperties().put(Exchange.LOG_DEBUG_BODY_MAX_CHARS, "100000"); this.getContext().getProperties().put(Exchange.MAXIMUM_CACHE_POOL_SIZE, "50"); fromF("amqp:queue:%s", name) .setHeader("eventid", constant(eventId)) .process(protoBufMessageProcessor).routeId(name) .choice() .when(header("messagetype").isEqualTo(ProtoMessageType.ADD_BET_OFFER)) .marshal(jacksonDataFormatProcessor.getJacksonDataFormat()).process(new AddEventUpdateProcessor()) .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_ADD)) .setHeader(CacheConstants.CACHE_KEY, header("eventid")) .to("log:ADD_OFFER") .to("cache://LiveCache") .when(header("messagetype").isEqualTo(ProtoMessageType.REMOVE_BET_OFFER)) .marshal(jacksonDataFormatProcessor.getJacksonDataFormat()).process(new RemoveEventUpdateProcessor()) .setHeader(CacheConstants.CACHE_OPERATION, constant(CacheConstants.CACHE_OPERATION_UPDATE)) .setHeader(CacheConstants.CACHE_KEY, header("eventid")) .to("log:REMOVE_OFFER") .to("cache://LiveCache") .otherwise() .to("log:unhandledevent"); } }); } -- View this message in context: http://camel.465427.n5.nabble.com/ProducerCache-memory-leak-tp5108206p5109713.html Sent from the Camel - Users mailing list archive at Nabble.com.