Bump akka to 2.6.16
[controller.git] / akka / repackaged-akka-jar / src / main / resources / stream_reference.conf
1 #####################################
2 # Akka Stream Reference Config File #
3 #####################################
4
5 # eager creation of the system wide materializer
6 akka.library-extensions += "akka.stream.SystemMaterializer$"
7 akka {
8   stream {
9
10     # Default materializer settings
11     materializer {
12
13       # Initial size of buffers used in stream elements
14       initial-input-buffer-size = 4
15       # Maximum size of buffers used in stream elements
16       max-input-buffer-size = 16
17
18       # Fully qualified config path which holds the dispatcher configuration
19       # or full dispatcher configuration to be used by ActorMaterializer when creating Actors.
20       dispatcher = "akka.actor.default-dispatcher"
21
22       # Fully qualified config path which holds the dispatcher configuration
23       # or full dispatcher configuration to be used by stream operators that
24       # perform blocking operations
25       blocking-io-dispatcher = "akka.actor.default-blocking-io-dispatcher"
26
27       # Cleanup leaked publishers and subscribers when they are not used within a given
28       # deadline
29       subscription-timeout {
30         # when the subscription timeout is reached one of the following strategies on
31         # the "stale" publisher:
32         # cancel - cancel it (via `onError` or subscribing to the publisher and
33         #          `cancel()`ing the subscription right away
34         # warn   - log a warning statement about the stale element (then drop the
35         #          reference to it)
36         # noop   - do nothing (not recommended)
37         mode = cancel
38
39         # time after which a subscriber / publisher is considered stale and eligible
40         # for cancelation (see `akka.stream.subscription-timeout.mode`)
41         timeout = 5s
42       }
43
44       # Enable additional troubleshooting logging at DEBUG log level
45       debug-logging = off
46
47       # Maximum number of elements emitted in batch if downstream signals large demand
48       output-burst-limit = 1000
49
50       # Enable automatic fusing of all graphs that are run. For short-lived streams
51       # this may cause an initial runtime overhead, but most of the time fusing is
52       # desirable since it reduces the number of Actors that are created.
53       # Deprecated, since Akka 2.5.0, setting does not have any effect.
54       auto-fusing = on
55
56       # Those stream elements which have explicit buffers (like mapAsync, mapAsyncUnordered,
57       # buffer, flatMapMerge, Source.actorRef, Source.queue, etc.) will preallocate a fixed
58       # buffer upon stream materialization if the requested buffer size is less than this
59       # configuration parameter. The default is very high because failing early is better
60       # than failing under load.
61       #
62       # Buffers sized larger than this will dynamically grow/shrink and consume more memory
63       # per element than the fixed size buffers.
64       max-fixed-buffer-size = 1000000000
65
66       # Maximum number of sync messages that actor can process for stream to substream communication.
67       # Parameter allows to interrupt synchronous processing to get upstream/downstream messages.
68       # Allows to accelerate message processing that happening within same actor but keep system responsive.
69       sync-processing-limit = 1000
70
71       debug {
72         # Enables the fuzzing mode which increases the chance of race conditions
73         # by aggressively reordering events and making certain operations more
74         # concurrent than usual.
75         # This setting is for testing purposes, NEVER enable this in a production
76         # environment!
77         # To get the best results, try combining this setting with a throughput
78         # of 1 on the corresponding dispatchers.
79         fuzzing-mode = off
80       }
81
82       io.tcp {
83         # The outgoing bytes are accumulated in a buffer while waiting for acknowledgment
84         # of pending write. This improves throughput for small messages (frames) without
85         # sacrificing latency. While waiting for the ack the stage will eagerly pull
86         # from upstream until the buffer exceeds this size. That means that the buffer may hold
87         # slightly more bytes than this limit (at most one element more). It can be set to 0
88         # to disable the usage of the buffer.
89         write-buffer-size = 16 KiB
90
91         # In addition to the buffering described for property write-buffer-size, try to collect
92         # more consecutive writes from the upstream stream producers.
93         #
94         # The rationale is to increase write efficiency by avoiding separate small
95         # writes to the network which is expensive to do. Merging those writes together
96         # (up to `write-buffer-size`) improves throughput for small writes.
97         #
98         # The idea is that a running stream may produce multiple small writes consecutively
99         # in one go without waiting for any external input. To probe the stream for
100         # data, this features delays sending a write immediately by probing the stream
101         # for more writes. This works by rescheduling the TCP connection stage via the
102         # actor mailbox of the underlying actor. Thus, before the stage is reactivated
103         # the upstream gets another opportunity to emit writes.
104         #
105         # When the stage is reactivated and if new writes are detected another round-trip
106         # is scheduled. The loop repeats until either the number of round trips given in this
107         # setting is reached, the buffer reaches `write-buffer-size`, or no new writes
108         # were detected during the last round-trip.
109         #
110         # This mechanism ensures that a write is guaranteed to be sent when the remaining stream
111         # becomes idle waiting for external signals.
112         #
113         # In most cases, the extra latency this mechanism introduces should be negligible,
114         # but depending on the stream setup it may introduce a noticeable delay,
115         # if the upstream continuously produces small amounts of writes in a
116         # blocking (CPU-bound) way.
117         #
118         # In that case, the feature can either be disabled, or the producing CPU-bound
119         # work can be taken off-stream to avoid excessive delays (e.g. using `mapAsync` instead of `map`).
120         #
121         # A value of 0 disables this feature.
122         coalesce-writes = 10
123       }
124
125       # Time to wait for async materializer creation before throwing an exception
126       creation-timeout = 20 seconds
127
128       //#stream-ref
129       # configure defaults for SourceRef and SinkRef
130       stream-ref {
131         # Buffer of a SinkRef that is used to batch Request elements from the other side of the stream ref
132         #
133         # The buffer will be attempted to be filled eagerly even while the local stage did not request elements,
134         # because the delay of requesting over network boundaries is much higher.
135         buffer-capacity = 32
136
137         # Demand is signalled by sending a cumulative demand message ("requesting messages until the n-th sequence number)
138         # Using a cumulative demand model allows us to re-deliver the demand message in case of message loss (which should
139         # be very rare in any case, yet possible -- mostly under connection break-down and re-establishment).
140         #
141         # The semantics of handling and updating the demand however are in-line with what Reactive Streams dictates.
142         #
143         # In normal operation, demand is signalled in response to arriving elements, however if no new elements arrive
144         # within `demand-redelivery-interval` a re-delivery of the demand will be triggered, assuming that it may have gotten lost.
145         demand-redelivery-interval = 1 second
146
147         # Subscription timeout, during which the "remote side" MUST subscribe (materialize) the handed out stream ref.
148         # This timeout does not have to be very low in normal situations, since the remote side may also need to
149         # prepare things before it is ready to materialize the reference. However the timeout is needed to avoid leaking
150         # in-active streams which are never subscribed to.
151         subscription-timeout = 30 seconds
152
153         # In order to guard the receiving end of a stream ref from never terminating (since awaiting a Completion or Failed
154         # message) after / before a Terminated is seen, a special timeout is applied once Terminated is received by it.
155         # This allows us to terminate stream refs that have been targeted to other nodes which are Downed, and as such the
156         # other side of the stream ref would never send the "final" terminal message.
157         #
158         # The timeout specifically means the time between the Terminated signal being received and when the local SourceRef
159         # determines to fail itself, assuming there was message loss or a complete partition of the completion signal.
160         final-termination-signal-deadline = 2 seconds
161       }
162       //#stream-ref
163     }
164
165     # Deprecated, left here to not break Akka HTTP which refers to it
166     blocking-io-dispatcher = "akka.actor.default-blocking-io-dispatcher"
167
168     # Deprecated, will not be used unless user code refer to it, use 'akka.stream.materializer.blocking-io-dispatcher'
169     # instead, or if from code, prefer the 'ActorAttributes.IODispatcher' attribute
170     default-blocking-io-dispatcher = "akka.actor.default-blocking-io-dispatcher"
171   }
172
173   # configure overrides to ssl-configuration here (to be used by akka-streams, and akka-http – i.e. when serving https connections)
174   ssl-config {
175     protocol = "TLSv1.2"
176   }
177
178   actor {
179
180     serializers {
181       akka-stream-ref = "akka.stream.serialization.StreamRefSerializer"
182     }
183
184     serialization-bindings {
185       "akka.stream.SinkRef"                           = akka-stream-ref
186       "akka.stream.SourceRef"                         = akka-stream-ref
187       "akka.stream.impl.streamref.StreamRefsProtocol" = akka-stream-ref
188     }
189
190     serialization-identifiers {
191       "akka.stream.serialization.StreamRefSerializer" = 30
192     }
193   }
194 }
195
196 # ssl configuration
197 # folded in from former ssl-config-akka module
198 ssl-config {
199   logger = "com.typesafe.sslconfig.akka.util.AkkaLoggerBridge"
200 }