Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Created by Guest
Created on Sep 2, 2022

Asynchronous variant of IIdGenerator

We have use cases where IDs assigned to documents are generated by an external service. Communication with the external service is asynchronous. We have created custom IIdGenerator implementations for this purpose, and they work, but unfortunately the IIdGenerator interface is synchronous only. This exposes the known problems with "sync over async" code. Obviously we could assign the IDs manually and not rely on using an IIdGenerator, but it would be very convenient to have an async variant of the IIdGenerator interface for this use case.