val elements: List[(String, Any)] = List("name" -> "name", "age" -> 3, "salary" -> 4.0)
val document: BsonDocument = BsonDocument.from(elements)
Source
instead of returning a Future[Source]
. In the case when the future would fail, you could just let the stream itself fail directly. This could enable the use of stream supervision for recoverable failures (like when the mongo is not available during flow materialization, recover with a restart). In the end, Sources are easier to compose.
flags
in https://github.com/fehmicansaglam/tepkin/blob/master/tepkin/src/main/scala/net/fehmicansaglam/tepkin/protocol/message/Reply.scala but are not parsed (but maybe I am in the wrong version of the wire protocol).
MongoCursors
(it should never complete normally). if (cursorID == 0 && tailable) onError(new DeadCursorException())
. The user could then decide to use a proper failure policy (restart or fail the whole stream, or switch to another source or whatever)
MongoCursor
actor)