Akka Streams


Scala API

AKKA StreamsにおけるJavaとScalaのDSLは同じJARファイルで纏められているため、IntelliJのjavadslの自動インポートは無効にすること。

How to Create Akka Streams of Any Shape Using the Graph DSL

Comparing Kafka Streams, Akka Streams and Spark Streaming: what to use when


Akka Streams is best for high-performance systems, when you want to bake Akka Streams into your application. It has an extremely powerful API, but unless you know what you’re doing, it might be easy to shoot yourself (accidentally or not).

Kafka on the other hand works best as an external high performance message bus for your applications, so if you want microservices to read and write to and from a common event store, you might be best with Kafka. However, its Java-style API is cumbersome, but I understand it might be a matter of code cleanliness and taste.

Finally, Spark Streaming is without a doubt best for big data computation. Spark has always been good at that and here we also removed data bounds. However, at the moment of this recording, Spark Streaming is bad for actual application logic and low-latency, so you might want to use it as a data aggregator to gather insights from your data.

Materialized Values in Akka Streams

ActorMaterializer depricated

Akka 2.6.10 : ActorMaterializer--->Materializer




Akka Stream Operators

Apache Camel or Alpakka Endpoints

Apache CamelAkka Streamに以下のライブラリで統合

Apache Camel

Alpakka sample code

Materialized, NotUsed

Keep.left, Keep.right, Keep.both