Hi Claus,
I have not specifically enabled stream caching.
class MyFileEndpoint extends RouteBuilder with Consumer {
def endpointUri = "stream:file:data/input/actor"
def receive = {
case msg: CamelMessage => {
val mess = msg.bodyAs[String]
println("received %s" format mess)
}
case _ => {
println("Default block executed")
}
}
}
object FileEndpointApp extends App {
val sys = ActorSystem("MyActorSystem")
val myFileEndpointActor = sys.actorOf(Props[MyFileEndpoint], name =
"myFileEndpointActor")
sys.awaitTermination()
}
On 30 May 2013 14:13, Claus Ibsen-2 [via Camel] <
[email protected]> wrote:
> Hi
>
> That is because you have enabled stream caching
> http://camel.apache.org/stream-caching.html
>
> It has a overflow to disk spool.
>
> The file component is streaming out of the box. As it just routes the
> java.io.File handle.
> So you dont need the stream cache.
>
> And with Camels type converter system you can just grab that message
> body as a InputStream / FileInputStream to be in streaming mode.
>
>
> On Thu, May 30, 2013 at 3:01 PM, bendg25 <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=5733502&i=0>>
> wrote:
>
> > Hi
> >
> > i want to stream in files from a directory. The stream:file notation
> seems
> > to be for targeting one file for streaming in.
> >
> > I want to target a directory to poll, and when a file is detected have
> it
> > streamed in. At the moment, if the file size is over 64kb, Camel is
> > creating a tmp file. If the file is < 64Kb, Camel seems to read the
> entire
> > file into memory straight away.
> >
> > Can anyone help?
> >
> >
> >
> > --
> > View this message in context:
> http://camel.465427.n5.nabble.com/file-component-and-streaming-tp5733496.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
> --
> Claus Ibsen
> -----------------
> www.camelone.org: The open source integration conference.
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: [hidden email]<http://user/SendEmail.jtp?type=node&node=5733502&i=1>
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/file-component-and-streaming-tp5733496p5733502.html
> To unsubscribe from file component and streaming, click
> here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5733496&code=YmVuLmQuZ2lsbEBnbWFpbC5jb218NTczMzQ5NnwtMTU5NTgwMTgyOA==>
> .
> NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
Ben Gill
Beaconsfield Consultants
Mobile: (07584) 439620
Curzon House
64 Clifton Street
London EC2A 4HB
E-mail: [email protected]
Web: http://www.lisagillphotography.co.uk
--
View this message in context:
http://camel.465427.n5.nabble.com/file-component-and-streaming-tp5733496p5733509.html
Sent from the Camel - Users mailing list archive at Nabble.com.