I have a trigger set up on a database that fires a function whenever a new document is inserted. This function generates a summary from the full document and updates a collection in another database. It works well with small datasets, but during bulk insertions, it consumes all available database connections, causing bottlenecks for both external applications and MongoDB Atlas services.

When ordered: false, too many concurrent operations overwhelm the system. When ordered: true, updates are processed sequentially, leading to significant latency. I need help implementing connection limiting in the MongoDB Atlas function while maintaining unordered event processing.