Reputation: 13952
The way akka-stream fuses stages together is not very transparent. I was wondering if there is a way:
Upvotes: 1
Views: 162
Reputation: 22449
To see which stages are fused together
I'm not aware of any documented method for revealing fused graph stages. It's pretty safe to assume built-in linear operators will by default be fused (unless async
is applied).
To force some stages to be fused together
Earlier Akka Stream version does provide some methods for manual stage fusing and you could elect to disable the default auto-fusing with the following configuration setting:
akka.stream.materializer.auto-fusing=off
But the latest API (2.5
) attempts to not only handle fusing automatically under the hood, but also disallow manual fusing.
Upvotes: 1
Reputation: 19527
I'd say the documentation is pretty transparent about operator fusion:
By default, Akka Streams will fuse the stream operators.
Operator fusion is the default behavior, meaning that, by default, your entire stream will run within the same actor. To change this behavior, use the async
method to define asynchronous boundaries on the stages that you don't want to be fused.
Upvotes: 0