alpakka

MongoDB Reactive Streams run-time dependency error with Alpakka Mongo Connector ClassNotFoundException

天大地大妈咪最大 提交于 2021-02-17 06:31:07
问题 I'm trying to integrate the Alpakka Mongo Connector into an application that heavily relies on the Akka libraries for stream processing. The application utilizes Akka HTTP as well. I am encountering a dependency issue at run-time. In particular, I'm getting a NoClassDefFoundError for some kind of Success/Failure wrappers when I try to use the MongoSink.insertOne method provided by the Mongo connector. A full stack-trace: java.lang.NoClassDefFoundError: com/mongodb/reactivestreams/client

How to write CSV file with headers using akka stream alpakka?

…衆ロ難τιáo~ 提交于 2020-08-26 08:01:09
问题 I can't see to find it, hence i turn to slack to ask: Is there a way to write a csv file with its heards using akka stream alpakka ? The only thing i see is https://doc.akka.io/docs/alpakka/current/data-transformations/csv.html#csv-formatting But no reverse operation to csv to map somehow. My use case is that i need to read few csv files, filter their content, and write the clean content in a corresponding file orginalcsvfilename-cleanded.csv. If it is not directly supported, any

Alpakka S3 connector does not provide complete file

送分小仙女□ 提交于 2020-03-25 17:52:14
问题 Downloading a file from S3 storage using Alpakka S3 connector does not provide the whole file, only a part of it. Assuming settings and attributes are correct, since upload works fine, I wonder what could be the reason. val s3File: Source[Option[(Source[ByteString, NotUsed], ObjectMetadata)], NotUsed] = S3.download(bucketName, fileName).withAttributes(attributes) s3File.runWith(Sink.head)(materializer) flatMap { case Some(result) => result._1.runWith(Sink.head)(materializer) map { data =>

What is the passthrough used for in alpakka-kafka connector while producing messages?

孤街浪徒 提交于 2019-12-13 02:55:53
问题 This is the code for producing a single message to Kafka given in the doc https://doc.akka.io/docs/alpakka-kafka/current/producer.html val single: ProducerMessage.Envelope[KeyType, ValueType, PassThroughType] = ProducerMessage.single( new ProducerRecord("topicName", key, value), passThrough ) Could you please explain what is passThrough used for? 回答1: passThrough is an additional value which comes to be available for use in ProducerMessage.Results ’s passThrough() . As the official

Alpakka MongoDB - specify type in MongoSource

天涯浪子 提交于 2019-12-10 11:48:34
问题 I'm currently playing around with Akka Streams and the Alpakka MongoDB connector. Is it possible to specify the type for MongoSource ? val codecRegistry = fromRegistries(fromProviders(classOf[TodoMongo]), DEFAULT_CODEC_REGISTRY) private val todoCollection: MongoCollection[TodoMongo] = mongoDb .withCodecRegistry(codecRegistry) .getCollection("todo") I would like to do something like this: val t: FindObservable[Seq[TodoMongo]] = todoCollection.find() MongoSource(t) // Stuck here But I get the