def ignore: Sink[Any, Unit] = new Sink(new BlackholeSink(DefaultAttributes.ignoreSink, shape("BlackholeSink")))
val elements: List[(String, Any)] = List("name" -> "name", "age" -> 3, "salary" -> 4.0) val document: BsonDocument = BsonDocument.from(elements)
Sourceinstead 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.