Multiple Service on single file polling port?

Hi All,

How can configur multiple service on single file polling port. I am gonna recive all files in a single folder but with some naming convention which i am going to add in in file filter but now it is not allowing me to configure multiple service on single port.

Failed to update listener: [ISS.0014.9109] A listener is already registered with the key FilePollingListener:C:\WSGInbound\Inbound. The existing listener must be unregistered first

Thanks
Atul

You can’t mention multiple services on single polling port. What you can do is have one service(Service A) to poll the directory and depending on the file name call other services(Service B or Service C) to process file.

Just curious, why don’t you have subfolders for for different types of file and have the monitoring on the parent folder with recursive polling ? to keep things organize.

Hi Talha,

Thanks for the reply.

All of our customer are going to drop their files on FTP in a single folder where they can only see there files and from their one pearl script is moving all files to WSG file polling folder. Reason behind having one single folder is that if any new customer comes then no need to add any new folder on FTP server, network team will just crate a user and will add it in a one user group.

Current version of pearl script is not moving files depending on their file names, it is just moving all files to a single WSG inblound folder.

Thanks

Easiest one - As Talha rightly said , have a main service to pick any file and then according to the filename pattern use switch-case and invoke file specific services

What Talha and dhruvm have identified is known as a Content Based Router, in the world of EIP. (OK, you have to reach a bit and consider the filename as ‘content’)

Another possible approach:

Multiple file polling ports, each configured to pick up different filename patterns and invoke a different service.

The challenge here will be making sure filename patterns do not collide.

Hi Reamon,

Thats not possible i guess, we can not point multiple service to poll fils from same folder even if we put file filter. If it is possible then can you please tell me how can i do that.

Thanks
Atul

I believe in this case it would poll for anyfile , but i your service you have to make sure that the files of your interest gets picked and you dont consider others …

Its not possible to create Multiple Service’ on single file polling port. But you can poll the files from one single folder. In this case you can create two file polling ports.

Ex: Polling port 1 —Service1(based on file filter)
/FolderA
Ex: Polling port 2 —Service2 (based on file filter)
/FolderA

2 Likes