I'm a new user to camel and I've successfully implemented a working sample.
But I what to know the best approach to implement a use case I have.
We have a web application where files are uploaded, these can be anything up
to 10MB limit compressed or uncompressed. The first step I want to do is
store the original file on a file server then unzip the file if nessacary
and store them on the file server. This zip file may contain more than one
file. These files would then go back on a queue for processing by another
application.
One of my ideas was after storing the files on the file server I could just
publish the url to the file for processing because Im concerned about
passing a large file around in RAM.
I think I should be using pipeline and blob message in activemq ....
heres what i got so far.
-------------
FileUploadController.java
Map<String, Object> headers = new HashMap<String, Object>();
headers.put("filename", file.getOriginalFilename());
headers.put("emstype",
fileUpload.getCouncilUnit().getEmsType().getId().toString());
headers.put("filetype", fileUpload.getFileType().getId().toString());
headers.put("process",
fileUploadManager.isForDataProcessing(fileUpload));
log.info("headers " + headers);
getCamelTemplate().sendBodyAndHeaders("activemq:queue:files",
fileUpload.getFile(), headers);
-------------------
RouteBuilder
from("activemq:queue:files").setHeader(FileComponent.HEADER_FILE_NAME,el("${in.headers.filename}"))
.to("ftp://[EMAIL PROTECTED]&binary=true")
.choice().when(
header("process").isEqualTo(true)).to("activemq:queue:datamapper")
-----------------
As you can see I assuming in this example that the files are not zipped but
I think that the after storing the file in the ftp server that the file is
still in memory because im publishing it to another queue, could I not just
publish the url to the datamapper queue or how do I take advantage of the
blob message?
Hopefully someone can point me in the right direction
--
View this message in context:
http://www.nabble.com/Large-file-processing-tp16993253s22882p16993253.html
Sent from the Camel - Users mailing list archive at Nabble.com.