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 Flavio Orfano
Created on Mar 11, 2026

Kotlin driver - force the default batch size to 101 - JAVA-5700

What problem are you trying to solve?

Focus on the what and why of the need you have, not the how you'd like it solved.

MongoClient uses the number of elements requested via the first call to org.reactivestreams.Subscription.request(long) as the number of documents to return in the first batch and uses the number of elements requested via subsequent calls as the batchSize in the getMore commands.

This is related with https://jira.mongodb.org/browse/JAVA-5700

What would you like to see happen?

Describe the desired outcome or enhancement.

force the default batch size to 101 instead of the number of elements requested via the first (per Subscription) call

Why is this important to you or your team?

Explain how the request adds value or solves a business need.

This can avoid performance impact when the number does not match the optimal one.

What steps, if any, are you taking today to manage this problem?

  • To create a Subscriber that requests a specific number of elements from Subscriber.onSubscribe

  • Use find with batchSize


  • Dasharath Dixit
    Mar 11, 2026

    Thanks, Flavio, for upbringing this up.

  • Aarni Alasaarela
    Mar 11, 2026

    Thank you so much for looking into this!

    The current solution defaulted our batch size to 2, which eventually lead to a major outage causing missed revenue.

    I think it will help a lot of people to get this fixed.