# SPDX-License-Identifier: Apache-2.0

# The StreamTestDefaultMailbox verifies that stream actors are using the dispatcher defined in ActorMaterializerSettings.
#
# All stream tests should use the dedicated `pekko.test.stream-dispatcher` or disable this validation by defining:
# pekko.actor.default-mailbox.mailbox-type = "org.apache.pekko.dispatch.UnboundedMailbox"
pekko.actor.default-mailbox.mailbox-type = "org.apache.pekko.stream.testkit.StreamTestDefaultMailbox"

# Dispatcher for stream actors. Specified in tests with
# ActorMaterializerSettings(dispatcher = "pekko.test.stream-dispatcher")
pekko.test.stream-dispatcher {
  type = Dispatcher
  executor = "fork-join-executor"
  fork-join-executor {
    parallelism-min = 8
    parallelism-max = 8
  }
  mailbox-requirement = "org.apache.pekko.dispatch.UnboundedMessageQueueSemantics"
}

pekko.stream {
  materializer {
    dispatcher = "pekko.test.stream-dispatcher"
  }
}
