Hi,
There is a better way!
Two possible solutions:
1) The fileAge attribute. The File connector now contains an attribute
which will only read files that are XX milliseconds old. The problem that
you describe was a common problem and this is how it has been solved. So
you can configure the file connector in Mule to read files that are, say, 5
minutes old so that there will be enough time for the initial file to have
been created/written out completely. Then configure a simple FTP outbound
endpoint. The problem is that you have to calculate the value of the fileAge
attribute in advance. The advantage is that everything is in config.
2) Dynamic endpoints. Another solution (if you want to preserve the e-mail
part of your description) is to code a router/component that will read the
e-mail and, upon receipt, read from a dynamically created inbound file
endpoint. The problem here is that you need coding but most things can be
set as properties so you can still have a flexible solution that is pretty
much in config.
Regards
Antoine
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
email:
antoine.borg@... | blog: blog.ricston.com | web: ricston.com
-----Original Message-----
From: dhenton9000 [mailto:
dhenton@...]
Sent: Tuesday, August 26, 2008 11:04 PM
To:
user@...
Subject: [mule-user] FTP in response to mail queue message
I'd like to initiate an FTP transfer after my mule instance receives a
message to a POP3 mail message. We've had problems in the past with file
transfers occurring while the file is being deposited in the folder, so we'd
like to initiate file transfer after we know the file creation step is
completed.
I'm looking for a way to wire up Mule to do it, as a standard behavior
without custom code.
Here's the scenario. Process A writes a large file out to folder F, and when
complete emails a POP3 account that is being monitored by mule. Mule then
initiates the FTP transfer.
The only way I can think to do this is to write a custom component that is
fired off by Mule, and then creates a temporary new instance of mule, and is
configured one time to FTP transfer from the folder F. That mule instance is
then destroyed on completion.
There's got to be a better way, and any suggestions would be very welcome!
--
View this message in context:
http://www.nabble.com/FTP-in-response-to-mail-queue-message-tp19170374p19170374.html
Sent from the Mule - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email