Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 62102 invoked from network); 8 Jan 2009 01:12:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2009 01:12:42 -0000 Received: (qmail 63258 invoked by uid 500); 8 Jan 2009 01:12:42 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 63242 invoked by uid 500); 8 Jan 2009 01:12:42 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 63231 invoked by uid 99); 8 Jan 2009 01:12:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 17:12:42 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of willem.jiang@gmail.com designates 209.85.142.188 as permitted sender) Received: from [209.85.142.188] (HELO ti-out-0910.google.com) (209.85.142.188) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Jan 2009 01:12:32 +0000 Received: by ti-out-0910.google.com with SMTP id a20so5981600tia.0 for ; Wed, 07 Jan 2009 17:12:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=nZ5mwZyPNZn9w2aMgj0V4cMM9G9lGbQ9l2aNBOLqsbs=; b=gpefrMMHdtzHSVCgcmpr9KdL3DdpV6a1QP7EoUdxE40nt8l6GW0Me1dTH0w8+esfZJ pNG0CLzIjrkKpcxVSZA4Ssw7uLzMBuIOSX26/ZDtpC+q5JzwVnda5m+aeq0pM+SpHCZK 0jcYCXoglGtIx+jTpX8WH5CyHfRSikodHcwkU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=b70+sYB3NTUHBOKA+gmjXqCresHxh+uoHz5xSMNcTwNhbjKQ2UcDt0DZ5dytwnP+uS /TJif0uTnY+CX9tqCyMw2WRqakEyxAOtYc6iWMiZ/Oy7IIsZ3w5eq3HxZ7D2G1Tmc5aK y6Mxp1npYO1/F8WBYLlS06D0MEJmOhllSbPy4= Received: by 10.110.8.5 with SMTP id 5mr9016713tih.33.1231377129750; Wed, 07 Jan 2009 17:12:09 -0800 (PST) Received: from ?192.168.0.131? ([221.223.248.235]) by mx.google.com with ESMTPS id u12sm2430432tia.9.2009.01.07.17.12.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Jan 2009 17:12:08 -0800 (PST) Message-ID: <496552DB.30505@gmail.com> Date: Thu, 08 Jan 2009 09:11:55 +0800 From: Willem Jiang User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: camel-user@activemq.apache.org Subject: Re: File Streaming References: <21331825.post@talk.nabble.com> <5380c69c0901070616i78b6a925je92ae4121e8696e@mail.gmail.com> <21339132.post@talk.nabble.com> <21341264.post@talk.nabble.com> In-Reply-To: <21341264.post@talk.nabble.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Stephen, Thanks for your contributions, we really love them. Here are some notes for contributing a patch. 1. Using "svn diff " to create a patch. 2. Creating a JIRA[1] ticket and attaching the patch with this JIRA 3. Granting the patch with license to ASF for inclusion in ASF works [1] https://issues.apache.org/activemq/browse/CAMEL Willem Stephen J wrote: > I've attached a diff that should fix the parameter problems. The patch also > updates the consumer with the ability to scan a file similar to the unix > tail -f command. > > Please review and change as necessary. > http://www.nabble.com/file/p21341264/camel-stream-fix.zip > camel-stream-fix.zip > > > Stephen J wrote: >> It doesn't appear that the stream:file component works. It looks like it >> doesn't recognize the file parameter. Here's the stack trace when you try >> to use a uri like: stream:file?file=logTest.txt >> >> 125 [main] DEBUG org.apache.camel.impl.DefaultCamelContext - Adding >> routes from: Routes: [Route[[From[stream:file?file=logTest.txt]] -> >> [To[stream:out]]]] routes: [] >> 125 [main] INFO org.apache.camel.impl.DefaultCamelContext - Apache >> Camel (CamelContext:camel-1) is starting >> 234 [main] DEBUG org.apache.camel.impl.DefaultComponentResolver - Found >> component: stream via type: >> org.apache.camel.component.stream.StreamComponent via: >> META-INF/services/org/apache/camel/component/stream >> 250 [main] DEBUG org.apache.camel.impl.DefaultComponent - Creating >> endpoint uri=[stream:file?file=logTest.txt], path=[file], >> parameters=[{file=logTest.txt}] >> 265 [main] DEBUG org.apache.camel.impl.DefaultCamelContext - Failed to >> resolve endpoint stream:file?file=logTest.txt. Reason: >> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >> endpoint: stream:file?file=logTest.txt due to: There are 1 parameters that >> couldn't be set on the endpoint. Check the uri if the parameters are spelt >> correctly and that they are properties of the endpoint. Unknown >> parameters=[{file=logTest.txt}] >> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >> endpoint: stream:file?file=logTest.txt due to: There are 1 parameters that >> couldn't be set on the endpoint. Check the uri if the parameters are spelt >> correctly and that they are properties of the endpoint. Unknown >> parameters=[{file=logTest.txt}] >> at >> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:95) >> at >> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:329) >> at >> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54) >> at org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:96) >> at >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106) >> at >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112) >> at org.apache.camel.model.FromType.resolveEndpoint(FromType.java:72) >> at >> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:81) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:239) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:86) >> at >> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:660) >> at >> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:650) >> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49) >> at cameltests.CometTest.main(CometTest.java:16) >> Exception in thread "main" >> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >> endpoint: stream:file?file=logTest.txt due to: >> org.apache.camel.ResolveEndpointFailedException: Failed to resolve >> endpoint: stream:file?file=logTest.txt due to: There are 1 parameters that >> couldn't be set on the endpoint. Check the uri if the parameters are spelt >> correctly and that they are properties of the endpoint. Unknown >> parameters=[{file=logTest.txt}] >> at >> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:349) >> at >> org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:54) >> at org.apache.camel.model.RouteType.resolveEndpoint(RouteType.java:96) >> at >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106) >> at >> org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112) >> at org.apache.camel.model.FromType.resolveEndpoint(FromType.java:72) >> at >> org.apache.camel.impl.DefaultRouteContext.getEndpoint(DefaultRouteContext.java:81) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:239) >> at org.apache.camel.model.RouteType.addRoutes(RouteType.java:86) >> at >> org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:660) >> at >> org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:650) >> at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:49) >> at cameltests.CometTest.main(CometTest.java:16) >> Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to >> resolve endpoint: stream:file?file=logTest.txt due to: There are 1 >> parameters that couldn't be set on the endpoint. Check the uri if the >> parameters are spelt correctly and that they are properties of the >> endpoint. Unknown parameters=[{file=logTest.txt}] >> at >> org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:95) >> at >> org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:329) >> ... 12 more >> >> >> Claus Ibsen-2 wrote: >>> Hi Stephen >>> >>> The @deprecated stuff might have been wrong in the wiki. The code is >>> not @deprecated. >>> >>> Could you try using it. And let us know if it works nicely. >>> The code is there to read from a file stream. >>> >>> And then we can remove the @deprecated stuff. >>> >>> And we could add a stream file consuming wiki sample that is missing. >>> >>> >>> On Wed, Jan 7, 2009 at 2:59 PM, Stephen J >>> wrote: >>>> Is there a way to set up a file source as a stream instead of consuming >>>> the >>>> file? >>>> >>>> I've looked at the file component and it doesn't seem to support this >>>> use. I >>>> also looked at the stream component, but because the file feature of >>>> that >>>> component is deprecated I would be hesitant to use it. >>>> >>>> Basically I'd like something that would be similar to a unix "tail -f" >>>> on a >>>> text file. It would keep the file open, passing any content written by >>>> other >>>> programs through camel processors etc. to other camel defined endpoints. >>>> >>>> Is this possible? >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/File-Streaming-tp21331825s22882p21331825.html >>>> Sent from the Camel - Users mailing list archive at Nabble.com. >>>> >>>> >>> >>> >>> -- >>> >>> /Claus Ibsen >>> Apache Camel Committer >>> Blog: http://davsclaus.blogspot.com/ >>> >>> >> >