This content has been marked as final.
Show 4 replies
-
1. Re: FTP x number of files at 1 time
tfennelly Sep 12, 2008 4:39 AM (in response to chuaky)I looked at the code and config and I don't see a way of filtering the remote file list in this way.
In any case, it sounds like your #1 issue is the processing of these 10M files. You should really be splitting these up before routing them into the ESB. Sucking 10M into memory and JMS/DB for every message is a recipe for disaster :-( See the "huge-split-...." quickstart. -
2. Re: FTP x number of files at 1 time
chuaky Sep 12, 2008 10:27 PM (in response to chuaky)hi tfennelly,
The huge file example use a fs-listener example, i am not sure if it applies to ftp. Processing the 10M file takes less than 20 seconds, for a single file processing (including JMS writing to DB).
There is a for loop for the filelist, maybe could abort is the count exceeds a threshold set in the ftp-message-filter ???
Thankspackage org.jboss.soa.esb.listeners.gateway; ... public abstract class AbstractFileGateway extends AbstractManagedLifecycle implements ScheduledEventListener { /** * Execute on trigger from the scheduler. */ public void onSchedule() throws SchedulingException { File[] fileList; try { fileList = getFileList(); if(fileList == null) { _logger.warn("No files to process."); return; } } catch (GatewayException e) { _logger.error("Can't retrieve file list", e); return; } for (File fileIn : fileList) {
-
3. Re: FTP x number of files at 1 time
tfennelly Sep 13, 2008 6:12 AM (in response to chuaky)"chuaky" wrote:
The huge file example use a fs-listener example, i am not sure if it applies to ftp. Processing the 10M file takes less than 20 seconds, for a single file processing (including JMS writing to DB).
Sure it can process a single 10M file, but can it handle 10 or 100 of them (concurrently)?
You should be able to modify the fs-listener to work for FTP. If you have large files (10M is large), this is the only reliable way of processing them."chuaky" wrote:
There is a for loop for the filelist, maybe could abort is the count exceeds a threshold set in the ftp-message-filter ???
Sure. Give it a try if you're happy with that. -
4. Re: FTP x number of files at 1 time
chuaky Sep 15, 2008 1:36 AM (in response to chuaky)hi tfennelly,
Thanks for the feedback.
Sure it can process a single 10M file, but can it handle 10 or 100 of them (concurrently)?
It can't processing 100 of them at same time, because the JMS is very busy writing into DB. Maybe controlling the rate ESB is receiving the FTP files can resolve the issue.
Best regards.