Allow users to provide to limit the thread pool size or to supply an own ExecutorService.
Was:
Unlimited thread pool growth using AsynchronousSocketChannel
Mongo Driver async uses AsynchronousSocketChannel without channel grouping that leads to the creation of an unbounded default thread pool. The pool grows with concurrent connection use, and it's not possible to limit the thread pool size or to supply an own ExecutorService.
This arrangement can allocate a lot of resources which is not desirable in the particular scenario of nonblocking usage. It's not possible to limit resources or a strategy for back-pressure caused by higher workload than available resources (reject, queue, allocate resources). Supplying an ExecutorService via AsynchronousSocketChannelStreamFactoryFactory could help to address the issue.
The issue originated in MongoDB RS driver usage, hence I'm filing the ticket here and not in the JAVA (async) driver project.