camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henryk Konsek <hekon...@gmail.com>
Subject Re: Stream consuming in Camel
Date Thu, 09 Jan 2014 14:11:23 GMT
> I have a use case where one of my thread is outputting data to a stream.
> I need a camel consumer which consumes this stream from that thread

Consider using stream [1] component reading from URL. You'll need to
create custom URL handler [1] to consume the data from your thread.

from("stream:yourCustomProtocol).to("stream:file:///myFiles/fileFromStream");

Then you can consume created file as soon as the streaming will end,
using File [3] component.

from("file:///myFiles?readLock=changed").("mock:");

Cheers.

[1] http://camel.apache.org/stream.html
[2] http://stackoverflow.com/questions/861500/url-to-load-resources-from-the-classpath-in-java
[3] http://camel.apache.org/file2.html

Henryk Konsek
http://henryk-konsek.blogspot.com

Mime
View raw message