Skip to content

Tag: akka

How to use ${akka.kafka.consumer}?

I’m attempting to use the default Kafka config settings but I’m unsure how ${akka.kafka.consumer} is set. Reading https://doc.akka.io/docs/alpakka-kafka/current/consumer.html#config-inheritance Ive defined the following : In application.conf I define : But receive error when I startup the Akka Clu…

Timed behaviors in Akka classic?

I am working with Akka classic, and have to setup timed behaviors – in Akka typed, I could do this using Behaviors.withTimers how do I accomplish this in Akka classic? It seems like we can create an actor in Akka using How do I use timers in this kind of initialization? Answer See the docs on Timers: ht…

Calcualte average using Akka Streams

Using this guide : https://doc.akka.io/docs/akka/current/stream/operators/Source-or-Flow/splitAfter.html I’m attempting to calculate the average of a number of attributes within a List. More specifically, using the code below I’m attempting to calculate the average value for a an actor source that…

fold not working as expected using akka streams

Below is code I’ve written to try an output the sum of each akka message received which has been edited from this guide : https://doc.akka.io/docs/akka/current/stream/stream-flows-and-basics.html The fold operation seems to cause nothing to outputted on the console. However if I use instead of Then the …

How to access the computation result of an Akka Stream?

I’m attempting to return the result of a stream operation which in this case is: sum a list square the value square the value which is represented as: To access the value I use followed by : Which requires a blocking call to allow the stream to complete which is not acceptable: If I use: an error is ret…

Sending data to an Akka Stream

I’m attempting to send an ArrayList to an Akka stream for processing. The stream processes the list as follows: I have defined the code below to try to achieve this result: Sending data to the stream using : actorRef.tell(Arrays.asList(1,2,3), ActorRef.noSender()); does not appear to have any impact as …