Watch keynotes and sessions from MongoDB.live, our virtual developer conference.

Is there a retry mechanism for Atlas trigger functions?

Is there a re-drive mechanism for MongoDB triggers in Atlas? I can not find it in Atlas UI, neither can find documentation about it

Example:

My trigger function is calling a service, if the service is down at that time I can not find a way to re-drive these failed attempts later.

AWS Lambda for example, has a Dead Letter Queue so you can re-drive the failed events later if needed.

There should be some mechanism that stores failed events for a period of times and some retry logic like:
-X times every 10 minutes, if all attempts failed, send events to S3 or an SQS, and you should be able to manually retry them later or ignore them

No - there’s not a similar retry feature built-in to the Atlas Trigger facility. You can code this by inspecting the trigger state using a function. In the trigger configuration, you can specify the function name, or code for a function to be executed as a result of the trigger operation. That being said, there is a restart configuration for triggers that get stuck in a suspended state - https://docs.atlas.mongodb.com/triggers/#restart-a-suspended-trigger - but I don’t think that’s what you’re after.

1 Like