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: File Streaming
Date Thu, 08 Jan 2009 05:28:28 GMT
Hi

Great work stephen.

Yeah please follow Willems instructions. You can also read about
contributing here:
http://activemq.apache.org/camel/contributing.html

Then we will get your fixes into the camel distros.

On Thu, Jan 8, 2009 at 2:11 AM, Willem Jiang <willem.jiang@gmail.com> wrote:
> 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 <stephen.joyner@mclaneco.com>
>>>> 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/
>>>>
>>>>
>>>
>>
>
>



-- 

/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/

Mime
View raw message