Questions tagged [akka-stream]

Akka implementation for handling streaming data on the JVM

Akka implementation of reactive-streams standard for handling streaming data on the .

This library uses Akka Actor based transformations of data streams which proceed as a series of steps which can be executed in parallel, in a pipelined fashion.

More info:

1741 questions
10
votes
3 answers

Akka HTTP Streaming JSON Deserialization

Is it possible to dynamically deserialize an external, of unknown length, ByteString stream from Akka HTTP into domain objects? Context I call an infinitely long HTTP endpoint that outputs a JSON Array that keeps growing: [ { "prop": true,…
Martijn
  • 2,268
  • 3
  • 25
  • 51
10
votes
2 answers

Akka-Stream implementation slower than single threaded implementation

UPDATE FROM 2015-10-30 based on Roland Kuhn Awnser: Akka Streams is using asynchronous message passing between Actors to implement stream processing stages. Passing data across an asynchronous boundary has an overhead that you are seeing…
10
votes
2 answers

In akka-stream how to create a unordered Source from a futures collection

I need to create an akka.stream.scaladsl.Source[T, Unit] from a collection of Future[T]. E.g., having a collection of futures returning integers, val f1: Future[Int] = ??? val f2: Future[Int] = ??? val fN: Future[Int] = ??? val futures = List(f1,…
Tvaroh
  • 6,645
  • 4
  • 51
  • 55
9
votes
1 answer

What does a Materialized value means and why it is different in below logic for same graph?

I am new to Akka Stream and have only started reading its docs as of last week. I am able to understand most of the concepts but I am finding it hard to understand what Materialized Value means in Akka stream and what its significance is?. If…
Explorer
  • 1,491
  • 4
  • 26
  • 67
9
votes
2 answers

How to use Akka HTTP to generate contents via an output stream

I'm quite newbie to Akka Streams and Akka HTTP. I'd like to generate a simple HTTP server that can generate a zip file from the contents of a folder and send it to the client. The org.zeroturnaround.zip.ZipUtil makes the task of creating a zip file…
david.perez
  • 6,090
  • 4
  • 34
  • 57
9
votes
1 answer

Akka Stream vs Spark Stream

What are advantage/disadvantage of using akka stream vs spark stream for stream processing? like, built in back pressure, performance, fault tolerance, built in transformation, flexibility etc. I'm NOT asking akka vs spark pros/cons strictly…
Hiren
  • 708
  • 1
  • 7
  • 14
9
votes
1 answer

Akka Streams custom merge

I'm new to akka-streams and not sure how to approach this problem. I have 3 source streams are sorted by a sequence ID. I want to group the values together which have the same ID. Values in each stream may be missing or duplicated. If one stream is…
dwickern
  • 3,519
  • 1
  • 14
  • 21
9
votes
1 answer

How to limit an Akka Stream to execute and send down one message only once per second?

I have an Akka Stream and I want the stream to send messages down stream approximately every second. I tried two ways to solve this problem, the first way was to make the producer at the start of the stream only send messages once every second when…
Phil
  • 46,436
  • 33
  • 110
  • 175
9
votes
1 answer

Akka-streams - how to access the materialized value of the stream

I am learning to work with Akka streams, and really loving it, but the materialization part is still somewhat a mystery to me. Quoting from…
Yardena
  • 2,837
  • 20
  • 17
9
votes
3 answers

Close akka-http websocket connection from server

In my scenario, a client sends "goodbye" websocket message and I need to close previously established connection at the server side. From akka-http docs: Closing connections is possible by cancelling the incoming connection Flow from your server…
Tvaroh
  • 6,645
  • 4
  • 51
  • 55
8
votes
2 answers

passing an Akka stream to an upstream service to populate

I need to call an upstream service (Azure Blob Service) to push data to an OutputStream, which then i need to turn around and push it back to the client, thru akka. Without akka (and just servlet code), i'd just get the ServletOutputStream and pass…
MeBigFatGuy
  • 28,272
  • 7
  • 61
  • 66
8
votes
1 answer

Proper way to programmatically stop an Alpakka Kafka stream

We are trying to use Akka Streams with Alpakka Kafka to consume a stream of events in a service. For handling event processing errors we are using Kafka autocommit and more than one queue. For example, if we have the topic user_created, which we…
SergiGP
  • 669
  • 7
  • 17
8
votes
3 answers

Pushing elements externally to a reactive stream in fs2

I have an external (that is, I cannot change it) Java API which looks like this: public interface Sender { void send(Event e); } I need to implement a Sender which accepts each event, transforms it to a JSON object, collects some number of them…
Vladimir Matveev
  • 120,085
  • 34
  • 287
  • 296
8
votes
0 answers

No response from remote for outbound association. Handshake timed out after [15000 ms] Error in Akka Clustering

I am having a 3 node Akka Cluster and 3 actors are running on each node of the cluster. The cluster is running fine for some 2 hours but after 2 hours I am getting the following warning: [INFO] [06/07/2018 15:08:51.923]…
Prog_G
  • 1,539
  • 1
  • 8
  • 22
8
votes
3 answers

SHA256 of data stream

I am having a use case where i am downloading the file from URL using GET request. Is it possible to calculate SHA256 of file stream without saving to disk or holding an entire object in memory?
Rajeev
  • 4,762
  • 8
  • 41
  • 63