If you want multithreaded file processing, then rather than use direct, which 
is not multithreaded, use either seda:, vm:, or disruptor:, which allow you to 
set concurrentConsumers=X, and get asynchronous multithreaded processing.

You will have to set some parameters for the smb, look at the "file" component 
that tell it to pickup multiple files at 1 time (maxMessagesPerPoll=X).  


-----Original Message-----
From: Jakub Bekier [mailto:jakub.beki...@gmail.com] 
Sent: Tuesday, April 23, 2019 3:46 AM
To: users@camel.apache.org
Subject: Camel smb:// - consuming a lot of files from one folder

[[ SEI WARNING *** This email was sent from an external source. Do not open 
attachments or click on links from unknown or suspicious senders. *** ]]


Zoran, thank you for your reply.
I have already tried adding "threads()", as mentioned above.
Or do you suggest splitting this as in:

"from("smb").threads(10).to("direct:foo")

from("direct:foo").to (...) //rest of route

But I don't know how this could improve the throughput.
The rest of the route is pretty straightforward processing using a couple
of "bean()" calls, some of which operate on injected singleton instances -
so the access rate is the same for many routes as well as one route.
I'm still wondering if Camel does not impose a limit on how many files can
be fetched at a time from a remote folder.

Reply via email to