0
votes

I have some questions on concepts of Mulesoft. If you could answer that would be appreciated.

1.When mule connects to an FTP server and checks for new files,does Mule by default deletes the file once it is downloaded? And can FTP is available both as polling and as event subscription based?

  1. When we connect to a RESTful service over HTTP, can Dynamic endpoints select whether HTTP or HTTPS is used or can be used to set the Host, Port and Path? (multiple choice for this question: a. Dynamic endpoints can select what transport to use. b. The Host, Port and Path can be set using dynamic endpoint. c. Dynamic endpoint can select whether HTTP or HTTPS is used. Which one is correct?)

  2. in configuration, if

is used, does it mean my1.properties will take precedence?

Thanks!

2

2 Answers

2
votes

1a) Community FTP connector will always delete the remote file. Enterprise FTP connector allows you to move it to another folder.

1b) Reading FTP connector is only available as a polling mechanism to read files from a FTP server.

2) The only part that can not be dynamic is the scheme, but you could place two connectors (one for HTTP and another for HTTPS) inside a choice and select which one to use dynamically.

3) I didn't get this, please elaborate a bit more.

HTH, Marcos

0
votes
  1. Yes, it does. Mule EE give more features as you can see in the documentation FTP is always polling the directory.

  2. You can setup HTTP or HTTPS. But, you can use a composite-source and tell that your flow is available for HTTP and HTTPS.

I know that it is possible, I found time ago the same requirement for FTP in mule forum. Hope this help

<!-- streaming to prevent deleting remote file -->
<ftp:connector name="ftpConnector" streaming="true" />

<flow name="ftpBridge">
<vm:inbound-endpoint path="fetchFtpFile" exchange-pattern="request-response"/>

<scripting:component>
<scripting:script engine="groovy">
def ftpFileUri = "ftp://${payload.userName}:${payload.password}@${payload.host}${payload.path}?fileNameFilter=${payload.fileName}"
muleContext.client.request(ftpFileUri, 30000L);
</scripting:script>
</scripting:component>
</flow>
  1. If you want to load properties you can use spring to do that. Review this link.