Effectively provides the behaviour not available on org.mongodb.scala.ClientSession (driver-scala, nor com.mongodb.reactivestreams.client.ClientSession driver-reactive-streams) but is available on com.mongodb.client.ClientSession (driver-core).
It is recommended to use the Future variant (i.e. add .toFuture to all db calls), since the Observable variant has some surprises. E.g.
some commands return Observable[Void] which will ignore any following map/flatMap (e.g. for-comprehension steps)
A transaction is started before running the continuation. It will be committed or aborted depending on whether the callback executes successfully or not. It also provides retries for network issues See https://github.com/mongodb/mongo-java-driver/tree/r4.3.1/driver-core/src/test/resources/transactions-convenient-api#retry-timeout-is-enforced And https://docs.mongodb.com/manual/core/retryable-writes/#retryable-writes-and-multi-document-transactions
A transaction is started before running the continuation. It will be committed or aborted depending on whether the callback executes successfully or not. It also provides retries for network issues See https://github.com/mongodb/mongo-java-driver/tree/r4.3.1/driver-core/src/test/resources/transactions-convenient-api#retry-timeout-is-enforced And https://docs.mongodb.com/manual/core/retryable-writes/#retryable-writes-and-multi-document-transactions