Ostrzyciel opened a new issue, #1948: URL: https://github.com/apache/pekko/issues/1948
When using `FlowOps.mapWithResource`, I would like to override the dispatcher used to run it, because I have a dedicated bulkheading dispatcher for specific types of workloads. By default the dispatcher is set to `default-blocking-io-dispatcher`. The scaladoc of the method says this: > You can configure the default dispatcher for this Source by changing the pekko.stream.materializer.blocking-io-dispatcher or set it for a given Source by using ActorAttributes. But I can't get this to work. Reproducible example: https://scastie.scala-lang.org/rg11wr5oSGK3aov3PZ9RmQ I have a very limited understanding of Pekko Streams internals, so my diagnosis may be very wrong. But, from what I can tell, this is because here we apply `withAttributes` to the `StatefulMap` stage, not the wrapping `via`: https://github.com/apache/pekko/blob/5ca1b3846e0846cdc0c745c7551b8ffdaeee1266/stream/src/main/scala/org/apache/pekko/stream/scaladsl/Flow.scala#L1187-L1193 As far as I understand, because the stage with applied attributes is wrapped in a `via`, we have no way of overriding its settings, as the attributes set on nested-most stage take precedence. I can walk around this issue simply by using `statefulMap` instead, so it's not a huge deal, aside from being a headache to figure out. I will try to contribute a fix for this. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org For additional commands, e-mail: notifications-h...@pekko.apache.org