0

At moment of writing this question, I am using Spring Framework 5.0.0.M5 and Akka 2.4.17. In project I am currently using actor messaging and streams from Akka. I see, that Spring Framework v5 has also streams.

According to http://projectreactor.io/

"As a Reactive Engine/SPI, both Reactor Core and IO modules expose reactive streams constructs for focused use cases, eventually combined with Spring, RxJava, Akka Streams, Ratpack... As a Reactive API, reactor framework modules will offer rich consumable features like composition and pub-sub eventing."

it looks like Spring uses Akka streams under the hood (plus other stuff).

Question is: what are possible advantages and disadvantages of switching from Akka streams to Spring streams?

EDIT: Here is much wider question (Reactov vs Akka in general): Akka or Reactor

Community
  • 1
  • 1
spam
  • 1,853
  • 2
  • 13
  • 33
  • "it looks like Spring uses Akka streams under the hood (plus other stuff)." I'm pretty sure it doesn't. – Branislav Lazic Feb 25 '17 at 21:52
  • the Akka or Reactor question might be a bit too outdated, as at that time Reactor was in beta towards 1.0.0. Reactor 3 is *very* different from the previous iterations, now closer to RxJava 1&2 – Simon Baslé Feb 27 '17 at 08:56

1 Answers1

1

Spring uses Reactor (http://projectreactor.io) under the hood, which implements the Reactive Streams specification. One main goal of that specification, which is also implemented by Akka Streams, is to allow interoperability of reactive libraries.

So it means that you can use an Akka Stream in a reactive Spring app, and Spring will connect it to its internal Reactor streams, or make conversions if you expose different reactive types eg. in your controllers.

Simon Baslé
  • 27,105
  • 5
  • 69
  • 70