How to make listeners in two nodes process a single file in a S3 bucket only once?


We have a requirement to listen to files in a S3 bucket. We are using PRPC 7.4. The listeners are waiting for the same file in the bucket. We need the files to be processed only once, by either of the nodes. I understand that enabling locks in the files would achieve the desired effect, but the nature of S3 does not allow for that, as far as I know. Is there a way to process the files only once?


Keep up to date on this post and subscribe to comments

November 21, 2018 - 6:32am

If both the nodes belong to the same Pega cluster, only one thread of a given file listener across the cluster will process a single file. The processing thread holds a cluster level lock inside Pega (not the file lock) to ensure that only one file listener is processing a given file.

September 30, 2019 - 10:27pm

Hi ,

 Kindly create a listener on multi node Environment, configuring it to read the file to specified location, as we are rung the listener in multi node kindly use the option of  Lock listener's temporary file which will avoid the duplication read or locking of the files.