Due to concurrent polling there were duplicate jobs being spawned. This behaviour is caused because there is no row locking mechanism in place. So when multiple instance ran concurrently they could end up selecting the same messages leading to duplicates
this is the query which i have identified is causing the issue.
Potential Fix:
Use FOR UPDATE to lock the selected rows to prevent concurrent access.
Due to concurrent polling there were duplicate jobs being spawned. This behaviour is caused because there is no row locking mechanism in place. So when multiple instance ran concurrently they could end up selecting the same messages leading to duplicates
this is the query which i have identified is causing the issue.
Potential Fix:
Use
FOR UPDATEto lock the selected rows to prevent concurrent access.