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
7
votes
2 answers

Alpakka KinesisSink : Can not push messages to Stream

I am trying to use the alpakka kinesis connector to send messages to a Kinesis Stream but I have no success with it. I tried the code below but nothing in my stream. implicit val sys = ActorSystem() implicit val mat = ActorMaterializer() implicit…
ccheneson
  • 49,072
  • 8
  • 63
  • 68
7
votes
1 answer

akka stream consume web socket

Getting started with akka-streams I want to build a simple example. In chrome using a web socket plugin I simply can connect to a stream like this one https://blockchain.info/api/api_websocket via wss://ws.blockchain.info/inv and sending 2…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
7
votes
2 answers

Akka Stream, Source from function?

I want to have a Source that evaluates a function at given intervals and emits its output. As a workaround, I can do it with a Source.queue + offer, but haven't found a cleaner way to do it. Ideally I would have something like def myFunction() =…
ticofab
  • 7,551
  • 13
  • 49
  • 90
7
votes
1 answer

Why does akka-stream's Source.groupedWithin not respect the duration?

With akka-streams 2.4.17 Scala API, I'm trying to use Source.groupedWithin(size, duration) and specifying a duration. From the documentation and what I've seen in the source code, the grouping should proceed downward if either the group size or…
Jordan Parmer
  • 36,042
  • 30
  • 97
  • 119
7
votes
1 answer

akka http client system.shutdown() produce "Outgoing request stream error (akka.stream.AbruptTerminationException)" when using https

Hi the following code works as expected. implicit val system = ActorSystem() implicit val materializer = ActorMaterializer() import system.dispatcher val request = HttpRequest(uri =…
Xzer
  • 93
  • 6
7
votes
3 answers

Akka Stream Option output

I have created an Akka Stream which has a simple Source, Flow and Sink. With this I can easily send elements through it. Now I want to change this stream so that the Flow returns an Option. Depending on the result of the Option I want to change the…
RemcoW
  • 4,196
  • 1
  • 22
  • 37
7
votes
2 answers

Akka HTTP Websocket, how to identify connections inside of actor

I'm working on simple mulitplayer game in scala that I would like to expose through websockets for JS clients. Here is my WebsocketServer class class WebsocketServer(actorRef: ActorRef, protocol: Protocol, system: ActorSystem, materializer:…
Norbert Orzechowicz
  • 1,329
  • 9
  • 20
7
votes
1 answer

Create backpressure from a Future inside an Akka stream

I'm new to Akka streams and streams in general so I might have completely misunderstood something at a conceptual level, but is there any way I can create backpressure until a future resolves? Essentially what I want to do is like this: object…
Alex Gilleran
  • 597
  • 3
  • 12
7
votes
1 answer

Migration from Play 2.4.1 to 2.5.6 - Sockets

I have updated my Play Framework version from 2.4.1 to 2.5.6 but now I have a problem with the web sockets management. I have a Controller class where method liveUpdate() return a WebSocket instance. In this method I use…
David Geirola
  • 616
  • 3
  • 17
7
votes
4 answers

Akka Stream - Timer or Scheduler like CRON

I use Akka Stream on Scala. I'd like to set a scheduler which runs on every 24:00. I tried to search for it. But I could't find what I want to do. Could you tell me how to write code?
ryo
  • 2,009
  • 5
  • 24
  • 44
7
votes
1 answer

Akka stream - List to mapAsync of individual elements

My stream has a Flow whose outputs are List[Any] objects. I want to have a mapAsync followed by some other stages each of which processed an individual element instead of the list. How can I do that? Effectively I want to connect the output of…
anindyaju99
  • 465
  • 1
  • 5
  • 16
7
votes
1 answer

Akka Streams Websocket Wiring

I'm trying to figure out the best way to implement a real websocket app using akka-http and akka-streams. What I'm mostly looking for is simplicity, which I'm just not getting now. Assume you have a fairly complex pipeline which needs to…
user510159
  • 1,379
  • 14
  • 26
7
votes
1 answer

Akka stream - putting an IO bound Flow on a different dispatcher

My stream has an even mix of CPU bound and IO bound stages (every IO stage is followed by a CPU stage). What I want to do is put the IO operations on a different dispatcher than the rest of the stream. In a traditional actor based Akka application I…
anindyaju99
  • 465
  • 1
  • 5
  • 16
7
votes
1 answer

akka-stream - How to treat the last element of a stream differently in a Flow/Graph

I'm trying to implement an Akka Streams Flow that will convert a stream of JSON objects to a stream of a single array of JSON objects. I can use Concat to add an "[" before and "]" after, as well as Zip to insert commas in between elements, but I…
Rag
  • 195
  • 1
  • 13
7
votes
1 answer

Akka Flow hangs when making http requests via connection pool

I'm using Akka 2.4.4 and trying to move from Apache HttpAsyncClient (unsuccessfully). Below is simplified version of code that I use in my project. The problem is that it hangs if I send more than 1-3 requests to the flow. So far after 6 hours of…
expert
  • 29,290
  • 30
  • 110
  • 214