Questions tagged [akka]

Akka is an open-source toolkit and runtime simplifying the construction of concurrent and distributed applications on the JVM. It implements the actor model known from Erlang.

From its website:

We believe that writing correct concurrent, fault-tolerant and scalable applications is too hard. Most of the time it's because we are using the wrong tools and the wrong level of abstraction. Akka is here to change that. Using the Actor Model and Software Transactional Memory, we raise the abstraction level and provide a better platform to build correct concurrent and scalable applications. For fault-tolerance, we adopt the "Let it crash" / "Embrace failure" model, which has been used with great success in the telecom industry to build applications that self-heal, and systems that never stop. Actors also provide the abstraction for transparent distribution and the basis for truly scalable and fault-tolerant applications. Akka is Open Source and available under the Apache 2 License.

Recommended reference sources

Documentation

What does AKKA mean?

It is the name of a beautiful Swedish mountain up in the northern part of Sweden called Laponia. The mountain is also sometimes called ‘The Queen of Laponia’.

Akka is also the name of a goddess in the Sámi (the native Swedish population) mythology. She is the goddess that stands for all the beauty and good in the world. The mountain can be seen as the symbol of this goddess.

Also, the name AKKA is a palindrome of letters A and K as in Actor Kernel.

Akka is also:

  • the name of the goose that Nils travelled across Sweden on in The Wonderful Adventures of Nils by the Swedish writer Selma Lagerlöf.
  • the Finnish word for ‘nasty elderly woman’ and the word for ‘elder sister’ in the Indian languages Tamil, Telugu, Kannada and Marathi.
  • a font
  • a town in Morocco
  • a near-earth asteroid
8162 questions
3
votes
1 answer

Scala IntelliJ warning "dynamic invocation could be replaced with a constructor invocation"

Why does Intellij give this warning, what does it mean, how can I make it better ? import akka.actor.Props object Router { def props(config: Config, addresses: Set[Address]): Props = Props(classOf[Router], config, addresses) // "dynamic…
Stephen
  • 4,228
  • 4
  • 29
  • 40
3
votes
1 answer

akka http client follow redirect

The akka-http documentation provides an example to query a http service: http://doc.akka.io/docs/akka-http/current/scala/http/client-side/request-level.html how can I tell akka-http to automatically follow redirects, instead of receiving a…
David Portabella
  • 12,390
  • 27
  • 101
  • 182
3
votes
2 answers

Propagate slf4j MDC (mapped diagnostic context) in rxjava Observables

I'm using rxjava observables (v 1.1.8) in my play framework (with akka) application. I'd like to know if there's a way to propagate MDC info to rxjava Observables. I don't see MDC info in my log statements which get printed within…
Sree
  • 51
  • 3
3
votes
1 answer

Monadic short-circuiting in Akka Streams

I'd like to chain a series of Flow's of the form a -> Try[b], where each successive stage handles the Success case of the previous, and the Sink at the end handles all Failure generically. Can this or something equivalent be encoded succinctly? It's…
3
votes
1 answer

akka cluster Connection refused: address is now > gated for [5000] ms

I have a cluster with 2 workers and 1 master. the cluster is implemented with Akka and Scala. When i killed the worker and try to run it again with the following command: java -Xms3500M -Xmx3500M -Dlog_file_name=worker1 …
Tal Avissar
  • 10,088
  • 6
  • 45
  • 70
3
votes
1 answer

Make Reactive Kafka work with Confluent Schema Registry Avro Schema

How to make Reactive Kafka (https://github.com/akka/reactive-kafka) work with Confluent Schema Registry Avro Schema? Here is my sample code: def create(groupId: String)(implicit system: ActorSystem):…
Casel Chen
  • 497
  • 2
  • 8
  • 19
3
votes
1 answer

Akka Streams' ActorPublisher as a Source for web response - how back-pressure works

I use akka-streams' ActorPublisher actor as a streaming per-connection Source of data being sent to an incoming WebSocket or HTTP connection. ActorPublisher's contract is to regularly request data by supplying a demand - number of elements that can…
Tvaroh
  • 6,645
  • 4
  • 51
  • 55
3
votes
2 answers

Why is OneToMany relationship persisted in multiple rows in the Database

I have a hibernate entity class public class MyComplexClass implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) Long id; String name; int…
user_mda
  • 18,148
  • 27
  • 82
  • 145
3
votes
1 answer

Akka http losing sender reference

After receiving a Future[httpResponse] I'm trying to send the message to the sender but I'm loosing the reference of the sender. Here is the code of my receive method: def receive = { case Seq(method: HttpMethod, endpoint: String,…
Jean
  • 5,201
  • 11
  • 51
  • 87
3
votes
1 answer

Understanding backpressure in akka streams Source.queue

I'm trying out akka streams, but i can't get backpressure to work in my simple example. I am admittely not experienced with akka (streams), so probably I'm missing something big. I am producing (offering on a queue) integers faster than consuming…
3
votes
0 answers

PersistentActor with PriorityMailbox?

I would like to have an PersistentActor with a prioritized mailbox. When I follow the documentation example and use and UnboundedPriorityMailbox, it does not fulfill the PersistentActors Stash constraint of implementing …
Stefan K.
  • 7,701
  • 6
  • 52
  • 64
3
votes
1 answer

Akka & Java - dead letters encountered

I'm trying to create an Akka Actors system where each actor may create several new child actors. For example: Actor A reads a 200K lines input file and for each line in it will assign that text line to Actor B. Actor B, depending on some business…
t-rex-50
  • 201
  • 1
  • 4
  • 10
3
votes
1 answer

How to copy an Akka Persistence Cassandra database

We have a Lagom-based project with several microservices, each one (of course) with its own Cassandra keyspace. We need to copy the production data to our qa and dev environments. In a traditional database we would simply export all of the…
Mario Camou
  • 2,303
  • 16
  • 28
3
votes
2 answers

How to wrap an REST API client in an Actor

I'm trying to write an actor that calls an HTTP REST API. The rest API needs a query parameter that will be passed from the invoking Actor. The official documentation has an example to achieve the above using a preStart method that pipes the message…
MojoJojo
  • 3,897
  • 4
  • 28
  • 54
3
votes
3 answers

Akka stream - limiting Flow rate without introducing delay

I'm working with Akka (version 2.4.17) to build an observation Flow in Java (let's say of elements of type to stay generic). My requirement is that this Flow should be customizable to deliver a maximum number of observations per unit of time as…
Antoine
  • 1,393
  • 4
  • 20
  • 26