Class ActorMaterializerSettings

java.lang.Object
org.apache.pekko.stream.ActorMaterializerSettings

public final class ActorMaterializerSettings extends Object
This class describes the configurable properties of the ActorMaterializer. Please refer to the withX methods for descriptions of the individual settings.

The constructor is not public API, use create or apply on the ActorMaterializerSettings companion instead.

  • Constructor Details

    • ActorMaterializerSettings

      public ActorMaterializerSettings()
  • Method Details

    • apply

      public static ActorMaterializerSettings apply(ActorSystem system)
      Deprecated.
      Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/docs/akka/2.6/project/migration-guide-2.5.x-2.6.x.html. Since Akka 2.6.0.
      Create ActorMaterializerSettings from the settings of an pekko.actor.ActorSystem (Scala).

      Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/docs/akka/2.6/project/migration-guide-2.5.x-2.6.x.html"

    • apply

      public static ActorMaterializerSettings apply(com.typesafe.config.Config config)
      Deprecated.
      Use config or attributes to configure the materializer. See migration guide for details https://doc.akka.io/docs/akka/2.6/project/migration-guide-2.5.x-2.6.x.html. Since Akka 2.6.0.
      Create ActorMaterializerSettings from a Config subsection (Scala).

      Prefer using either config for defaults or attributes for per-stream config. See migration guide for details https://doc.akka.io/docs/akka/2.6/project/migration-guide-2.5.x-2.6.x.html"

    • subscriptionTimeoutSettings

      public StreamSubscriptionTimeoutSettings subscriptionTimeoutSettings()
    • ioSettings

      public IOSettings ioSettings()
    • streamRefSettings

      public StreamRefSettings streamRefSettings()
    • withInputBuffer

      public ActorMaterializerSettings withInputBuffer(int initialSize, int maxSize)
      Deprecated.
      Use attribute 'Attributes.InputBuffer' to change setting value. Since Akka 2.6.0.
      Each asynchronous piece of a materialized stream topology is executed by one Actor that manages an input buffer for all inlets of its shape. This setting configures the default for initial and maximal input buffer in number of elements for each inlet. This can be overridden for individual parts of the stream topology by using pekko.stream.Attributes#inputBuffer.

      FIXME: this is used for all kinds of buffers, not only the stream actor, some use initial some use max, document and or fix if it should not be like that. Search for get[Attributes.InputBuffer] to see how it is used

    • withDispatcher

      public ActorMaterializerSettings withDispatcher(String dispatcher)
      Deprecated.
      Use attribute 'ActorAttributes.Dispatcher' to change setting value. Since Akka 2.6.0.
      This setting configures the default dispatcher to be used by streams materialized with the ActorMaterializer. This can be overridden for individual parts of the stream topology by using pekko.stream.Attributes#dispatcher.
    • withSubscriptionTimeoutSettings

      public ActorMaterializerSettings withSubscriptionTimeoutSettings(StreamSubscriptionTimeoutSettings settings)
      Leaked publishers and subscribers are cleaned up when they are not used within a given deadline, configured by StreamSubscriptionTimeoutSettings.
    • withIOSettings

      public ActorMaterializerSettings withIOSettings(IOSettings ioSettings)
    • withStreamRefSettings

      public ActorMaterializerSettings withStreamRefSettings(StreamRefSettings streamRefSettings)
      Change settings specific to SourceRef and SinkRef.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object