Current situation:
Mule version 3.5.0
I have an FTP server, where I can connect to using an ftp:inbound-endpoint using a specific path. On that specific path, a lot of files are put (some for us, some for others) so I use a filename-wildcard-filter to filter on specific filename patterns:
<flow name="flowA">
<ftp:inbound-endpoint host="${ftp.host}" port="${ftp.port}" user="${ftp.username}" password="${ftp.password}" path="${ftp.root.in}">
<file:filename-wildcard-filter pattern="${environment}*TYPE_A*.xml.gz" caseSensitive="false"/>
<gzip-uncompress-transformer/>
</ftp:inbound-endpoint>
<file:outbound-endpoint path="${home.dir}/typeA/in" responseTimeout="10000" outputPattern="#[message.inboundProperties.originalFilename]"/>
</flow>
This works great, but now I also want to create another flow that looks on the same FTP path for files with a different name:
<flow name="flowB">
<ftp:inbound-endpoint host="${ftp.host}" port="${ftp.port}" user="${ftp.username}" password="${ftp.password}" path="${ftp.root.in}">
<file:filename-wildcard-filter pattern="${environment}*TYPE_B*.xml.gz" caseSensitive="false"/>
<gzip-uncompress-transformer/>
</ftp:inbound-endpoint>
<file:outbound-endpoint path="${home.dir}/typeB/in" responseTimeout="10000" outputPattern="#[message.inboundProperties.originalFilename]"/>
</flow>
This gives me following exception:
Caused by: org.mule.api.transport.ConnectorException: There is already a listener registered on this connector on endpointUri: XXX
This means that it is not possible to have two ftp:inbound-endpoints listening at the same host but with a different filename-wildcard-filter...
How can I solve this? Do i specify one flow with one ftp:inbound-endpoint and I split up the incoming files based on the filename or is there a possibility to enable different ftp:inbound-endpoints listening on the same host?
You can try two with two connectors like :
And use then as...
Resp.