Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use the File connector in Mule Cloudhub for FTPS

Tags:

mule

cloudhub

Is there a way to configure a File connector for use in cloudhub, specifically related to reading in a file over FTPS and putting it into a file before beginning the actual processing of the contents?

Clarification: I'm in cloudhub, which does not provide a filesystem in the same sense that a local/on-prem Mule setup has. One standard practice when dealing with streams (FTPS or similar) in order to avoid processing over the open stream is to take the incoming stream and use the File connector (outbound in this case) to put the inbound stream into a file, and then use that file for your flow process. How is this managed in CloudHub?

like image 448
codeLes Avatar asked Oct 20 '22 14:10

codeLes


3 Answers

File Connector is to read files from paths specified on the server. They cannot be used to read from remote servers.

I case you want to have a File to start your flow with try the following.

<flow name="ftp_reader_flow">
    <ftp: inbound>   Read from the remote directory
    ...
    <file:outbound>  to a local directory
</flow>

<flow name="actual_processing_flow">
    <file:inbound>  read from the local directory.
    ... Continue with the processing
    .....
</flow>

Hope this helps.

like image 153
user1760178 Avatar answered Nov 03 '22 06:11

user1760178


You can use the connector for temporary data with the tmp directory.

From the MuleSoft Documentation:

Disk Persistence

CloudHub does not guarantee that writing to disk survives hardware failures. Instead, you must use an external storage mechanism to store information. For small amounts of data, you can use the Object Store. For applications that have large data storage requirements, we recommend use of a cloud service such as Amazon S3. For temporary storage, the File connector is still available and can be used with the /tmp directory.

like image 20
Erik P Avatar answered Nov 03 '22 05:11

Erik P


You can use File Connector in CloudHub as well, But Make sure your are reading or writing the file from classpath -src/main/resource or any folder from project classpath only.

like image 23
Integraty_beast Avatar answered Nov 03 '22 04:11

Integraty_beast