Akka手册译(一)——配置(3)

akka-remote

1.#####################################
2.# Akka Remote Reference Config File #
3.#####################################
4. 
5.# This is the reference config file that contains all the default settings.
6.# Make your edits/overrides in your application.conf.
7. 
8.# comments about akka.actor settings left out where they are already in akka-
9.# actor.jar, because otherwise they would be repeated in config rendering.
10.#
11.# For the configuration of the new remoting implementation (Artery) please look
12.# at the bottom section of this file as it is listed separately.
13. 
14.akka {
15. 
16.  actor {
17. 
18.    serializers {
19.      akka-containers = "akka.remote.serialization.MessageContainerSerializer"
20.      akka-misc = "akka.remote.serialization.MiscMessageSerializer"
21.      artery = "akka.remote.serialization.ArteryMessageSerializer"
22.      proto = "akka.remote.serialization.ProtobufSerializer"
23.      daemon-create = "akka.remote.serialization.DaemonMsgCreateSerializer"
24.      primitive-long = "akka.remote.serialization.LongSerializer"
25.      primitive-int = "akka.remote.serialization.IntSerializer"
26.      primitive-string = "akka.remote.serialization.StringSerializer"
27.      primitive-bytestring = "akka.remote.serialization.ByteStringSerializer"
28.      akka-system-msg = "akka.remote.serialization.SystemMessageSerializer"
29.    }
30. 
31.    serialization-bindings {
32.      "akka.actor.ActorSelectionMessage" = akka-containers
33. 
34.      "akka.remote.DaemonMsgCreate" = daemon-create
35. 
36.      "akka.remote.artery.ArteryMessage" = artery
37. 
38.      # Since akka.protobuf.Message does not extend Serializable but
39.      # GeneratedMessage does, need to use the more specific one here in order
40.      # to avoid ambiguity.
41.      "akka.protobuf.GeneratedMessage" = proto
42. 
43.      # Since com.google.protobuf.Message does not extend Serializable but
44.      # GeneratedMessage does, need to use the more specific one here in order
45.      # to avoid ambiguity.
46.      # This com.google.protobuf serialization binding is only used if the class can be loaded,
47.      # i.e. com.google.protobuf dependency has been added in the application project.
48.      "com.google.protobuf.GeneratedMessage" = proto
49.      
50.      "java.util.Optional" = akka-misc
51.    }
52. 
53.    # For the purpose of preserving protocol backward compatibility these bindings are not
54.    # included by default. They can be enabled with enable-additional-serialization-bindings=on.
55.    # They are enabled by default if akka.remote.artery.enabled=on.
56.    additional-serialization-bindings {
57.      "akka.actor.Identify" = akka-misc
58.      "akka.actor.ActorIdentity" = akka-misc
59.      "scala.Some" = akka-misc
60.      "scala.None$" = akka-misc
61.      "akka.actor.Status$Success" = akka-misc
62.      "akka.actor.Status$Failure" = akka-misc
63.      "akka.actor.ActorRef" = akka-misc
64.      "akka.actor.PoisonPill$" = akka-misc
65.      "akka.actor.Kill$" = akka-misc
66.      "akka.remote.RemoteWatcher$Heartbeat$" = akka-misc
67.      "akka.remote.RemoteWatcher$HeartbeatRsp" = akka-misc
68.      "akka.actor.ActorInitializationException" = akka-misc
69. 
70.      "akka.dispatch.sysmsg.SystemMessage" = akka-system-msg
71. 
72.      "java.lang.String" = primitive-string
73.      "akka.util.ByteString$ByteString1C" = primitive-bytestring
74.      "akka.util.ByteString$ByteString1" = primitive-bytestring
75.      "akka.util.ByteString$ByteStrings" = primitive-bytestring
76.      "java.lang.Long" = primitive-long
77.      "scala.Long" = primitive-long
78.      "java.lang.Integer" = primitive-int
79.      "scala.Int" = primitive-int
80. 
81.      # Java Serializer is by default used for exceptions.
82.      # It's recommended that you implement custom serializer for exceptions that are
83.      # sent remotely, e.g. in akka.actor.Status.Failure for ask replies. You can add
84.      # binding to akka-misc (MiscMessageSerializerSpec) for the exceptions that have
85.      # a constructor with single message String or constructor with message String as
86.      # first parameter and cause Throwable as second parameter. Note that it's not
87.      # safe to add this binding for general exceptions such as IllegalArgumentException
88.      # because it may have a subclass without required constructor.
89.      "java.lang.Throwable" = java
90.      "akka.actor.IllegalActorStateException" = akka-misc
91.      "akka.actor.ActorKilledException" = akka-misc
92.      "akka.actor.InvalidActorNameException" = akka-misc
93.      "akka.actor.InvalidMessageException" = akka-misc
94.    }
95. 
96.    serialization-identifiers {
97.      "akka.remote.serialization.ProtobufSerializer" = 2
98.      "akka.remote.serialization.DaemonMsgCreateSerializer" = 3
99.      "akka.remote.serialization.MessageContainerSerializer" = 6
100.      "akka.remote.serialization.MiscMessageSerializer" = 16
101.      "akka.remote.serialization.ArteryMessageSerializer" = 17
102.      "akka.remote.serialization.LongSerializer" = 18
103.      "akka.remote.serialization.IntSerializer" = 19
104.      "akka.remote.serialization.StringSerializer" = 20
105.      "akka.remote.serialization.ByteStringSerializer" = 21
106.      "akka.remote.serialization.SystemMessageSerializer" = 22
107.    }
108. 
109.    deployment {
110. 
111.      default {
112. 
113.        # if this is set to a valid remote address, the named actor will be
114.        # deployed at that node e.g. "akka.tcp://sys@host:port"
115.        remote = ""
116. 
117.        target {
118. 
119.          # A list of hostnames and ports for instantiating the children of a
120.          # router
121.          #   The format should be on "akka.tcp://sys@host:port", where:
122.          #    - sys is the remote actor system name
123.          #    - hostname can be either hostname or IP address the remote actor
124.          #      should connect to
125.          #    - port should be the port for the remote server on the other node
126.          # The number of actor instances to be spawned is still taken from the
127.          # nr-of-instances setting as for local routers; the instances will be
128.          # distributed round-robin among the given nodes.
129.          nodes = []
130. 
131.        }
132.      }
133.    }
134.  }
135. 
136.  remote {
137.    ### Settings shared by classic remoting and Artery (the new implementation of remoting)
138. 
139.    # If set to a nonempty string remoting will use the given dispatcher for
140.    # its internal actors otherwise the default dispatcher is used. Please note
141.    # that since remoting can load arbitrary 3rd party drivers (see
142.    # "enabled-transport" and "adapters" entries) it is not guaranteed that
143.    # every module will respect this setting.
144.    use-dispatcher = "akka.remote.default-remote-dispatcher"
145. 
146.    # Settings for the failure detector to monitor connections.
147.    # For TCP it is not important to have fast failure detection, since
148.    # most connection failures are captured by TCP itself.
149.    # The default DeadlineFailureDetector will trigger if there are no heartbeats within
150.    # the duration heartbeat-interval + acceptable-heartbeat-pause, i.e. 20 seconds
151.    # with the default settings.
152.    transport-failure-detector {
153. 
154.      # FQCN of the failure detector implementation.
155.      # It must implement akka.remote.FailureDetector and have
156.      # a public constructor with a com.typesafe.config.Config and
157.      # akka.actor.EventStream parameter.
158.      implementation-class = "akka.remote.DeadlineFailureDetector"
159. 
160.      # How often keep-alive heartbeat messages should be sent to each connection.
161.      heartbeat-interval = 4 s
162. 
163.      # Number of potentially lost/delayed heartbeats that will be
164.      # accepted before considering it to be an anomaly.
165.      # A margin to the `heartbeat-interval` is important to be able to survive sudden,
166.      # occasional, pauses in heartbeat arrivals, due to for example garbage collect or
167.      # network drop.
168.      acceptable-heartbeat-pause = 16 s
169.    }
170. 
171.    # Settings for the Phi accrual failure detector (http://www.jaist.ac.jp/~defago/files/pdf/IS_RR_2004_010.pdf
172.    # [Hayashibara et al]) used for remote death watch.
173.    # The default PhiAccrualFailureDetector will trigger if there are no heartbeats within
174.    # the duration heartbeat-interval + acceptable-heartbeat-pause + threshold_adjustment,
175.    # i.e. around 12.5 seconds with default settings.
176.    watch-failure-detector {
177. 
178.      # FQCN of the failure detector implementation.
179.      # It must implement akka.remote.FailureDetector and have
180.      # a public constructor with a com.typesafe.config.Config and
181.      # akka.actor.EventStream parameter.
182.      implementation-class = "akka.remote.PhiAccrualFailureDetector"
183. 
184.      # How often keep-alive heartbeat messages should be sent to each connection.
185.      heartbeat-interval = 1 s
186. 
187.      # Defines the failure detector threshold.
188.      # A low threshold is prone to generate many wrong suspicions but ensures
189.      # a quick detection in the event of a real crash. Conversely, a high
190.      # threshold generates fewer mistakes but needs more time to detect
191.      # actual crashes.
192.      threshold = 10.0
193. 
194.      # Number of the samples of inter-heartbeat arrival times to adaptively
195.      # calculate the failure timeout for connections.
196.      max-sample-size = 200
197. 
198.      # Minimum standard deviation to use for the normal distribution in
199.      # AccrualFailureDetector. Too low standard deviation might result in
200.      # too much sensitivity for sudden, but normal, deviations in heartbeat
201.      # inter arrival times.
202.      min-std-deviation = 100 ms
203. 
204.      # Number of potentially lost/delayed heartbeats that will be
205.      # accepted before considering it to be an anomaly.
206.      # This margin is important to be able to survive sudden, occasional,
207.      # pauses in heartbeat arrivals, due to for example garbage collect or
208.      # network drop.
209.      acceptable-heartbeat-pause = 10 s
210. 
211. 
212.      # How often to check for nodes marked as unreachable by the failure
213.      # detector
214.      unreachable-nodes-reaper-interval = 1s
215. 
216.      # After the heartbeat request has been sent the first failure detection
217.      # will start after this period, even though no heartbeat mesage has
218.      # been received.
219.      expected-response-after = 1 s
220. 
221.    }
222.    
223.    # remote deployment configuration section
224.    deployment {
225.      # If true, will only allow specific classes to be instanciated on this system via remote deployment
226.      enable-whitelist = off
227.      
228.      whitelist = []
229.    }
230. 
231.    ### Configuration for classic remoting
232. 
233.    # Timeout after which the startup of the remoting subsystem is considered
234.    # to be failed. Increase this value if your transport drivers (see the
235.    # enabled-transports section) need longer time to be loaded.
236.    startup-timeout = 10 s
237. 
238.    # Timout after which the graceful shutdown of the remoting subsystem is
239.    # considered to be failed. After the timeout the remoting system is
240.    # forcefully shut down. Increase this value if your transport drivers
241.    # (see the enabled-transports section) need longer time to stop properly.
242.    shutdown-timeout = 10 s
243. 
244.    # Before shutting down the drivers, the remoting subsystem attempts to flush
245.    # all pending writes. This setting controls the maximum time the remoting is
246.    # willing to wait before moving on to shut down the drivers.
247.    flush-wait-on-shutdown = 2 s
248. 
249.    # Reuse inbound connections for outbound messages
250.    use-passive-connections = on
251. 
252.    # Controls the backoff interval after a refused write is reattempted.
253.    # (Transports may refuse writes if their internal buffer is full)
254.    backoff-interval = 5 ms
255. 
256.    # Acknowledgment timeout of management commands sent to the transport stack.
257.    command-ack-timeout = 30 s
258. 
259.    # The timeout for outbound associations to perform the handshake.
260.    # If the transport is akka.remote.netty.tcp or akka.remote.netty.ssl
261.    # the configured connection-timeout for the transport will be used instead.
262.    handshake-timeout = 15 s
263.    
264.    ### Security settings
265. 
266.    # Enable untrusted mode for full security of server managed actors, prevents
267.    # system messages to be send by clients, e.g. messages like 'Create',
268.    # 'Suspend', 'Resume', 'Terminate', 'Supervise', 'Link' etc.
269.    untrusted-mode = off
270. 
271.    # When 'untrusted-mode=on' inbound actor selections are by default discarded.
272.    # Actors with paths defined in this white list are granted permission to receive actor
273.    # selections messages.
274.    # E.g. trusted-selection-paths = ["/user/receptionist", "/user/namingService"]
275.    trusted-selection-paths = []
276. 
277.    # Should the remote server require that its peers share the same
278.    # secure-cookie (defined in the 'remote' section)? Secure cookies are passed
279.    # between during the initial handshake. Connections are refused if the initial
280.    # message contains a mismatching cookie or the cookie is missing.
281.    require-cookie = off
282. 
283.    # Deprecated since 2.4-M1
284.    secure-cookie = ""
285. 
286.    ### Logging
287. 
288.    # If this is "on", Akka will log all inbound messages at DEBUG level,
289.    # if off then they are not logged
290.    log-received-messages = off
291. 
292.    # If this is "on", Akka will log all outbound messages at DEBUG level,
293.    # if off then they are not logged
294.    log-sent-messages = off
295. 
296.    # Sets the log granularity level at which Akka logs remoting events. This setting
297.    # can take the values OFF, ERROR, WARNING, INFO, DEBUG, or ON. For compatibility
298.    # reasons the setting "on" will default to "debug" level. Please note that the effective
299.    # logging level is still determined by the global logging level of the actor system:
300.    # for example debug level remoting events will be only logged if the system
301.    # is running with debug level logging.
302.    # Failures to deserialize received messages also fall under this flag.
303.    log-remote-lifecycle-events = on
304. 
305.    # Logging of message types with payload size in bytes larger than
306.    # this value. Maximum detected size per message type is logged once,
307.    # with an increase threshold of 10%.
308.    # By default this feature is turned off. Activate it by setting the property to
309.    # a value in bytes, such as 1000b. Note that for all messages larger than this
310.    # limit there will be extra performance and scalability cost.
311.    log-frame-size-exceeding = off
312. 
313.    # Log warning if the number of messages in the backoff buffer in the endpoint
314.    # writer exceeds this limit. It can be disabled by setting the value to off.
315.    log-buffer-size-exceeding = 50000
316. 
317. 
318. 
319.    # After failed to establish an outbound connection, the remoting will mark the
320.    # address as failed. This configuration option controls how much time should
321.    # be elapsed before reattempting a new connection. While the address is
322.    # gated, all messages sent to the address are delivered to dead-letters.
323.    # Since this setting limits the rate of reconnects setting it to a
324.    # very short interval (i.e. less than a second) may result in a storm of
325.    # reconnect attempts.
326.    retry-gate-closed-for = 5 s
327. 
328.    # After catastrophic communication failures that result in the loss of system
329.    # messages or after the remote DeathWatch triggers the remote system gets
330.    # quarantined to prevent inconsistent behavior.
331.    # This setting controls how long the Quarantine marker will be kept around
332.    # before being removed to avoid long-term memory leaks.
333.    # WARNING: DO NOT change this to a small value to re-enable communication with
334.    # quarantined nodes. Such feature is not supported and any behavior between
335.    # the affected systems after lifting the quarantine is undefined.
336.    prune-quarantine-marker-after = 5 d
337. 
338.    # If system messages have been exchanged between two systems (i.e. remote death
339.    # watch or remote deployment has been used) a remote system will be marked as
340.    # quarantined after the two system has no active association, and no
341.    # communication happens during the time configured here.
342.    # The only purpose of this setting is to avoid storing system message redelivery
343.    # data (sequence number state, etc.) for an undefined amount of time leading to long
344.    # term memory leak. Instead, if a system has been gone for this period,
345.    # or more exactly
346.    # - there is no association between the two systems (TCP connection, if TCP transport is used)
347.    # - neither side has been attempting to communicate with the other
348.    # - there are no pending system messages to deliver
349.    # for the amount of time configured here, the remote system will be quarantined and all state
350.    # associated with it will be dropped.
351.    quarantine-after-silence = 5 d
352. 
353.    # This setting defines the maximum number of unacknowledged system messages
354.    # allowed for a remote system. If this limit is reached the remote system is
355.    # declared to be dead and its UID marked as tainted.
356.    system-message-buffer-size = 20000
357. 
358.    # This setting defines the maximum idle time after an individual
359.    # acknowledgement for system messages is sent. System message delivery
360.    # is guaranteed by explicit acknowledgement messages. These acks are
361.    # piggybacked on ordinary traffic messages. If no traffic is detected
362.    # during the time period configured here, the remoting will send out
363.    # an individual ack.
364.    system-message-ack-piggyback-timeout = 0.3 s
365. 
366.    # This setting defines the time after internal management signals
367.    # between actors (used for DeathWatch and supervision) that have not been
368.    # explicitly acknowledged or negatively acknowledged are resent.
369.    # Messages that were negatively acknowledged are always immediately
370.    # resent.
371.    resend-interval = 2 s
372. 
373.    # Maximum number of unacknowledged system messages that will be resent
374.    # each 'resend-interval'. If you watch many (> 1000) remote actors you can
375.    # increase this value to for example 600, but a too large limit (e.g. 10000)
376.    # may flood the connection and might cause false failure detection to trigger.
377.    # Test such a configuration by watching all actors at the same time and stop
378.    # all watched actors at the same time.
379.    resend-limit = 200
380. 
381.    # WARNING: this setting should not be not changed unless all of its consequences
382.    # are properly understood which assumes experience with remoting internals
383.    # or expert advice.
384.    # This setting defines the time after redelivery attempts of internal management
385.    # signals are stopped to a remote system that has been not confirmed to be alive by
386.    # this system before.
387.    initial-system-message-delivery-timeout = 3 m
388. 
389.    ### Transports and adapters
390. 
391.    # List of the transport drivers that will be loaded by the remoting.
392.    # A list of fully qualified config paths must be provided where
393.    # the given configuration path contains a transport-class key
394.    # pointing to an implementation class of the Transport interface.
395.    # If multiple transports are provided, the address of the first
396.    # one will be used as a default address.
397.    enabled-transports = ["akka.remote.netty.tcp"]
398. 
399.    # Transport drivers can be augmented with adapters by adding their
400.    # name to the applied-adapters setting in the configuration of a
401.    # transport. The available adapters should be configured in this
402.    # section by providing a name, and the fully qualified name of
403.    # their corresponding implementation. The class given here
404.    # must implement akka.akka.remote.transport.TransportAdapterProvider
405.    # and have public constructor without parameters.
406.    adapters {
407.      gremlin = "akka.remote.transport.FailureInjectorProvider"
408.      trttl = "akka.remote.transport.ThrottlerProvider"
409.    }
410. 
411.    ### Default configuration for the Netty based transport drivers
412. 
413.    netty.tcp {
414.      # The class given here must implement the akka.remote.transport.Transport
415.      # interface and offer a public constructor which takes two arguments:
416.      #  1) akka.actor.ExtendedActorSystem
417.      #  2) com.typesafe.config.Config
418.      transport-class = "akka.remote.transport.netty.NettyTransport"
419. 
420.      # Transport drivers can be augmented with adapters by adding their
421.      # name to the applied-adapters list. The last adapter in the
422.      # list is the adapter immediately above the driver, while
423.      # the first one is the top of the stack below the standard
424.      # Akka protocol
425.      applied-adapters = []
426. 
427.      transport-protocol = tcp
428. 
429.      # The default remote server port clients should connect to.
430.      # Default is 2552 (AKKA), use 0 if you want a random available port
431.      # This port needs to be unique for each actor system on the same machine.
432.      port = 2552
433. 
434.      # The hostname or ip clients should connect to.
435.      # InetAddress.getLocalHost.getHostAddress is used if empty
436.      hostname = ""
437. 
438.      # Use this setting to bind a network interface to a different port
439.      # than remoting protocol expects messages at. This may be used
440.      # when running akka nodes in a separated networks (under NATs or docker containers).
441.      # Use 0 if you want a random available port. Examples:
442.      #
443.      # akka.remote.netty.tcp.port = 2552
444.      # akka.remote.netty.tcp.bind-port = 2553
445.      # Network interface will be bound to the 2553 port, but remoting protocol will
446.      # expect messages sent to port 2552.
447.      #
448.      # akka.remote.netty.tcp.port = 0
449.      # akka.remote.netty.tcp.bind-port = 0
450.      # Network interface will be bound to a random port, and remoting protocol will
451.      # expect messages sent to the bound port.
452.      #
453.      # akka.remote.netty.tcp.port = 2552
454.      # akka.remote.netty.tcp.bind-port = 0
455.      # Network interface will be bound to a random port, but remoting protocol will
456.      # expect messages sent to port 2552.
457.      #
458.      # akka.remote.netty.tcp.port = 0
459.      # akka.remote.netty.tcp.bind-port = 2553
460.      # Network interface will be bound to the 2553 port, and remoting protocol will
461.      # expect messages sent to the bound port.
462.      #
463.      # akka.remote.netty.tcp.port = 2552
464.      # akka.remote.netty.tcp.bind-port = ""
465.      # Network interface will be bound to the 2552 port, and remoting protocol will
466.      # expect messages sent to the bound port.
467.      #
468.      # akka.remote.netty.tcp.port if empty
469.      bind-port = ""
470. 
471.      # Use this setting to bind a network interface to a different hostname or ip
472.      # than remoting protocol expects messages at.
473.      # Use "0.0.0.0" to bind to all interfaces.
474.      # akka.remote.netty.tcp.hostname if empty
475.      bind-hostname = ""
476. 
477.      # Enables SSL support on this transport
478.      enable-ssl = false
479. 
480.      # Sets the connectTimeoutMillis of all outbound connections,
481.      # i.e. how long a connect may take until it is timed out
482.      connection-timeout = 15 s
483. 
484.      # If set to "" then the specified dispatcher
485.      # will be used to accept inbound connections, and perform IO. If "" then
486.      # dedicated threads will be used.
487.      # Please note that the Netty driver only uses this configuration and does
488.      # not read the "akka.remote.use-dispatcher" entry. Instead it has to be
489.      # configured manually to point to the same dispatcher if needed.
490.      use-dispatcher-for-io = ""
491. 
492.      # Sets the high water mark for the in and outbound sockets,
493.      # set to 0b for platform default
494.      write-buffer-high-water-mark = 0b
495. 
496.      # Sets the low water mark for the in and outbound sockets,
497.      # set to 0b for platform default
498.      write-buffer-low-water-mark = 0b
499. 
500.      # Sets the send buffer size of the Sockets,
501.      # set to 0b for platform default
502.      send-buffer-size = 256000b
503. 
504.      # Sets the receive buffer size of the Sockets,
505.      # set to 0b for platform default
506.      receive-buffer-size = 256000b
507. 
508.      # Maximum message size the transport will accept, but at least
509.      # 32000 bytes.
510.      # Please note that UDP does not support arbitrary large datagrams,
511.      # so this setting has to be chosen carefully when using UDP.
512.      # Both send-buffer-size and receive-buffer-size settings has to
513.      # be adjusted to be able to buffer messages of maximum size.
514.      maximum-frame-size = 128000b
515. 
516.      # Sets the size of the connection backlog
517.      backlog = 4096
518. 
519.      # Enables the TCP_NODELAY flag, i.e. disables Nagle’s algorithm
520.      tcp-nodelay = on
521. 
522.      # Enables TCP Keepalive, subject to the O/S kernel’s configuration
523.      tcp-keepalive = on
524. 
525.      # Enables SO_REUSEADDR, which determines when an ActorSystem can open
526.      # the specified listen port (the meaning differs between *nix and Windows)
527.      # Valid values are "on", "off" and "off-for-windows"
528.      # due to the following Windows bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4476378
529.      # "off-for-windows" of course means that it's "on" for all other platforms
530.      tcp-reuse-addr = off-for-windows
531. 
532.      # Used to configure the number of I/O worker threads on server sockets
533.      server-socket-worker-pool {
534.        # Min number of threads to cap factor-based number to
535.        pool-size-min = 2
536. 
537.        # The pool size factor is used to determine thread pool size
538.        # using the following formula: ceil(available processors * factor).
539.        # Resulting size is then bounded by the pool-size-min and
540.        # pool-size-max values.
541.        pool-size-factor = 1.0
542. 
543.        # Max number of threads to cap factor-based number to
544.        pool-size-max = 2
545.      }
546. 
547.      # Used to configure the number of I/O worker threads on client sockets
548.      client-socket-worker-pool {
549.        # Min number of threads to cap factor-based number to
550.        pool-size-min = 2
551. 
552.        # The pool size factor is used to determine thread pool size
553.        # using the following formula: ceil(available processors * factor).
554.        # Resulting size is then bounded by the pool-size-min and
555.        # pool-size-max values.
556.        pool-size-factor = 1.0
557. 
558.        # Max number of threads to cap factor-based number to
559.        pool-size-max = 2
560.      }
561. 
562. 
563.    }
564. 
565.    netty.udp = ${akka.remote.netty.tcp}
566.    netty.udp {
567.      transport-protocol = udp
568.    }
569. 
570.    netty.ssl = ${akka.remote.netty.tcp}
571.    netty.ssl = {
572.      # Enable SSL/TLS encryption.
573.      # This must be enabled on both the client and server to work.
574.      enable-ssl = true
575. 
576.      security {
577.        # This is the Java Key Store used by the server connection
578.        key-store = "keystore"
579. 
580.        # This password is used for decrypting the key store
581.        key-store-password = "changeme"
582. 
583.        # This password is used for decrypting the key
584.        key-password = "changeme"
585. 
586.        # This is the Java Key Store used by the client connection
587.        trust-store = "truststore"
588. 
589.        # This password is used for decrypting the trust store
590.        trust-store-password = "changeme"
591. 
592.        # Protocol to use for SSL encryption, choose from:
593.        # TLS 1.2 is available since JDK7, and default since JDK8:
594.        # https://blogs.oracle.com/java-platform-group/entry/java_8_will_use_tls
595.        protocol = "TLSv1.2"
596. 
597.        # Example: ["TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"]
598.        # You need to install the JCE Unlimited Strength Jurisdiction Policy
599.        # Files to use AES 256.
600.        # More info here:
601.        # http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider
602.        enabled-algorithms = ["TLS_RSA_WITH_AES_128_CBC_SHA"]
603. 
604.        # There are three options, in increasing order of security:
605.        # "" or SecureRandom => (default)
606.        # "SHA1PRNG" => Can be slow because of blocking issues on Linux
607.        # "AES128CounterSecureRNG" => fastest startup and based on AES encryption
608.        # algorithm
609.        # "AES256CounterSecureRNG"
610.        #
611.        # The following are deprecated in Akka 2.4. They use one of 3 possible
612.        # seed sources, depending on availability: /dev/random, random.org and
613.        # SecureRandom (provided by Java)
614.        # "AES128CounterInetRNG"
615.        # "AES256CounterInetRNG" (Install JCE Unlimited Strength Jurisdiction
616.        # Policy Files first)
617.        # Setting a value here may require you to supply the appropriate cipher
618.        # suite (see enabled-algorithms section above)
619.        random-number-generator = ""
620. 
621.        # Require mutual authentication between TLS peers
622.        #
623.        # Without mutual authentication only the peer that actively establishes a connection (TLS client side)
624.        # checks if the passive side (TLS server side) sends over a trusted certificate. With the flag turned on,
625.        # the passive side will also request and verify a certificate from the connecting peer.
626.        #
627.        # To prevent man-in-the-middle attacks you should enable this setting. For compatibility reasons it is
628.        # still set to 'off' per default.
629.        #
630.        # Note: Nodes that are configured with this setting to 'on' might not be able to receive messages from nodes that
631.        # run on older versions of akka-remote. This is because in older versions of Akka the active side of the remoting
632.        # connection will not send over certificates.
633.        #
634.        # However, starting from the version this setting was added, even with this setting "off", the active side
635.        # (TLS client side) will use the given key-store to send over a certificate if asked. A rolling upgrades from
636.        # older versions of Akka can therefore work like this:
637.        #   - upgrade all nodes to an Akka version supporting this flag, keeping it off
638.        #   - then switch the flag on and do again a rolling upgrade of all nodes
639.        # The first step ensures that all nodes will send over a certificate when asked to. The second
640.        # step will ensure that all nodes finally enforce the secure checking of client certificates.
641.        require-mutual-authentication = off
642.      }
643.    }
644. 
645.    ### Default configuration for the failure injector transport adapter
646. 
647.    gremlin {
648.      # Enable debug logging of the failure injector transport adapter
649.      debug = off
650.    }
651. 
652.    ### Default dispatcher for the remoting subsystem
653. 
654.    default-remote-dispatcher {
655.      type = Dispatcher
656.      executor = "fork-join-executor"
657.      fork-join-executor {
658.        parallelism-min = 2
659.        parallelism-factor = 0.5
660.        parallelism-max = 16
661.      }
662.      throughput = 10
663.    }
664. 
665.    backoff-remote-dispatcher {
666.      type = Dispatcher
667.      executor = "fork-join-executor"
668.      fork-join-executor {
669.        # Min number of threads to cap factor-based parallelism number to
670.        parallelism-min = 2
671.        parallelism-max = 2
672.      }
673.    }
674.  }
675.}

akka-remote (artery)

1.#####################################
2.# Akka Remote Reference Config File #
3.#####################################
4. 
5.# This is the reference config file that contains all the default settings.
6.# Make your edits/overrides in your application.conf.
7. 
8.# comments about akka.actor settings left out where they are already in akka-
9.# actor.jar, because otherwise they would be repeated in config rendering.
10.#
11.# For the configuration of the new remoting implementation (Artery) please look
12.# at the bottom section of this file as it is listed separately.
13. 
14.akka {
15. 
16.  actor {
17. 
18.    serializers {
19.      akka-containers = "akka.remote.serialization.MessageContainerSerializer"
20.      akka-misc = "akka.remote.serialization.MiscMessageSerializer"
21.      artery = "akka.remote.serialization.ArteryMessageSerializer"
22.      proto = "akka.remote.serialization.ProtobufSerializer"
23.      daemon-create = "akka.remote.serialization.DaemonMsgCreateSerializer"
24.      primitive-long = "akka.remote.serialization.LongSerializer"
25.      primitive-int = "akka.remote.serialization.IntSerializer"
26.      primitive-string = "akka.remote.serialization.StringSerializer"
27.      primitive-bytestring = "akka.remote.serialization.ByteStringSerializer"
28.      akka-system-msg = "akka.remote.serialization.SystemMessageSerializer"
29.    }
30. 
31.    serialization-bindings {
32.      "akka.actor.ActorSelectionMessage" = akka-containers
33. 
34.      "akka.remote.DaemonMsgCreate" = daemon-create
35. 
36.      "akka.remote.artery.ArteryMessage" = artery
37. 
38.      # Since akka.protobuf.Message does not extend Serializable but
39.      # GeneratedMessage does, need to use the more specific one here in order
40.      # to avoid ambiguity.
41.      "akka.protobuf.GeneratedMessage" = proto
42. 
43.      # Since com.google.protobuf.Message does not extend Serializable but
44.      # GeneratedMessage does, need to use the more specific one here in order
45.      # to avoid ambiguity.
46.      # This com.google.protobuf serialization binding is only used if the class can be loaded,
47.      # i.e. com.google.protobuf dependency has been added in the application project.
48.      "com.google.protobuf.GeneratedMessage" = proto
49.      
50.      "java.util.Optional" = akka-misc
51.    }
52. 
53.    # For the purpose of preserving protocol backward compatibility these bindings are not
54.    # included by default. They can be enabled with enable-additional-serialization-bindings=on.
55.    # They are enabled by default if akka.remote.artery.enabled=on.
56.    additional-serialization-bindings {
57.      "akka.actor.Identify" = akka-misc
58.      "akka.actor.ActorIdentity" = akka-misc
59.      "scala.Some" = akka-misc
60.      "scala.None$" = akka-misc
61.      "akka.actor.Status$Success" = akka-misc
62.      "akka.actor.Status$Failure" = akka-misc
63.      "akka.actor.ActorRef" = akka-misc
64.      "akka.actor.PoisonPill$" = akka-misc
65.      "akka.actor.Kill$" = akka-misc
66.      "akka.remote.RemoteWatcher$Heartbeat$" = akka-misc
67.      "akka.remote.RemoteWatcher$HeartbeatRsp" = akka-misc
68.      "akka.actor.ActorInitializationException" = akka-misc
69. 
70.      "akka.dispatch.sysmsg.SystemMessage" = akka-system-msg
71. 
72.      "java.lang.String" = primitive-string
73.      "akka.util.ByteString$ByteString1C" = primitive-bytestring
74.      "akka.util.ByteString$ByteString1" = primitive-bytestring
75.      "akka.util.ByteString$ByteStrings" = primitive-bytestring
76.      "java.lang.Long" = primitive-long
77.      "scala.Long" = primitive-long
78.      "java.lang.Integer" = primitive-int
79.      "scala.Int" = primitive-int
80. 
81.      # Java Serializer is by default used for exceptions.
82.      # It's recommended that you implement custom serializer for exceptions that are
83.      # sent remotely, e.g. in akka.actor.Status.Failure for ask replies. You can add
84.      # binding to akka-misc (MiscMessageSerializerSpec) for the exceptions that have
85.      # a constructor with single message String or constructor with message String as
86.      # first parameter and cause Throwable as second parameter. Note that it's not
87.      # safe to add this binding for general exceptions such as IllegalArgumentException
88.      # because it may have a subclass without required constructor.
89.      "java.lang.Throwable" = java
90.      "akka.actor.IllegalActorStateException" = akka-misc
91.      "akka.actor.ActorKilledException" = akka-misc
92.      "akka.actor.InvalidActorNameException" = akka-misc
93.      "akka.actor.InvalidMessageException" = akka-misc
94.    }
95. 
96.    serialization-identifiers {
97.      "akka.remote.serialization.ProtobufSerializer" = 2
98.      "akka.remote.serialization.DaemonMsgCreateSerializer" = 3
99.      "akka.remote.serialization.MessageContainerSerializer" = 6
100.      "akka.remote.serialization.MiscMessageSerializer" = 16
101.      "akka.remote.serialization.ArteryMessageSerializer" = 17
102.      "akka.remote.serialization.LongSerializer" = 18
103.      "akka.remote.serialization.IntSerializer" = 19
104.      "akka.remote.serialization.StringSerializer" = 20
105.      "akka.remote.serialization.ByteStringSerializer" = 21
106.      "akka.remote.serialization.SystemMessageSerializer" = 22
107.    }
108. 
109.    deployment {
110. 
111.      default {
112. 
113.        # if this is set to a valid remote address, the named actor will be
114.        # deployed at that node e.g. "akka.tcp://sys@host:port"
115.        remote = ""
116. 
117.        target {
118. 
119.          # A list of hostnames and ports for instantiating the children of a
120.          # router
121.          #   The format should be on "akka.tcp://sys@host:port", where:
122.          #    - sys is the remote actor system name
123.          #    - hostname can be either hostname or IP address the remote actor
124.          #      should connect to
125.          #    - port should be the port for the remote server on the other node
126.          # The number of actor instances to be spawned is still taken from the
127.          # nr-of-instances setting as for local routers; the instances will be
128.          # distributed round-robin among the given nodes.
129.          nodes = []
130. 
131.        }
132.      }
133.    }
134.  }
135. 
136.  remote {
137.    ### Settings shared by classic remoting and Artery (the new implementation of remoting)
138. 
139.    # If set to a nonempty string remoting will use the given dispatcher for
140.    # its internal actors otherwise the default dispatcher is used. Please note
141.    # that since remoting can load arbitrary 3rd party drivers (see
142.    # "enabled-transport" and "adapters" entries) it is not guaranteed that
143.    # every module will respect this setting.
144.    use-dispatcher = "akka.remote.default-remote-dispatcher"
145. 
146.    # Settings for the failure detector to monitor connections.
147.    # For TCP it is not important to have fast failure detection, since
148.    # most connection failures are captured by TCP itself.
149.    # The default DeadlineFailureDetector will trigger if there are no heartbeats within
150.    # the duration heartbeat-interval + acceptable-heartbeat-pause, i.e. 20 seconds
151.    # with the default settings.
152.    transport-failure-detector {
153. 
154.      # FQCN of the failure detector implementation.
155.      # It must implement akka.remote.FailureDetector and have
156.      # a public constructor with a com.typesafe.config.Config and
157.      # akka.actor.EventStream parameter.
158.      implementation-class = "akka.remote.DeadlineFailureDetector"
159. 
160.      # How often keep-alive heartbeat messages should be sent to each connection.
161.      heartbeat-interval = 4 s
162. 
163.      # Number of potentially lost/delayed heartbeats that will be
164.      # accepted before considering it to be an anomaly.
165.      # A margin to the `heartbeat-interval` is important to be able to survive sudden,
166.      # occasional, pauses in heartbeat arrivals, due to for example garbage collect or
167.      # network drop.
168.      acceptable-heartbeat-pause = 16 s
169.    }
170. 
171.    # Settings for the Phi accrual failure detector (http://www.jaist.ac.jp/~defago/files/pdf/IS_RR_2004_010.pdf
172.    # [Hayashibara et al]) used for remote death watch.
173.    # The default PhiAccrualFailureDetector will trigger if there are no heartbeats within
174.    # the duration heartbeat-interval + acceptable-heartbeat-pause + threshold_adjustment,
175.    # i.e. around 12.5 seconds with default settings.
176.    watch-failure-detector {
177. 
178.      # FQCN of the failure detector implementation.
179.      # It must implement akka.remote.FailureDetector and have
180.      # a public constructor with a com.typesafe.config.Config and
181.      # akka.actor.EventStream parameter.
182.      implementation-class = "akka.remote.PhiAccrualFailureDetector"
183. 
184.      # How often keep-alive heartbeat messages should be sent to each connection.
185.      heartbeat-interval = 1 s
186. 
187.      # Defines the failure detector threshold.
188.      # A low threshold is prone to generate many wrong suspicions but ensures
189.      # a quick detection in the event of a real crash. Conversely, a high
190.      # threshold generates fewer mistakes but needs more time to detect
191.      # actual crashes.
192.      threshold = 10.0
193. 
194.      # Number of the samples of inter-heartbeat arrival times to adaptively
195.      # calculate the failure timeout for connections.
196.      max-sample-size = 200
197. 
198.      # Minimum standard deviation to use for the normal distribution in
199.      # AccrualFailureDetector. Too low standard deviation might result in
200.      # too much sensitivity for sudden, but normal, deviations in heartbeat
201.      # inter arrival times.
202.      min-std-deviation = 100 ms
203. 
204.      # Number of potentially lost/delayed heartbeats that will be
205.      # accepted before considering it to be an anomaly.
206.      # This margin is important to be able to survive sudden, occasional,
207.      # pauses in heartbeat arrivals, due to for example garbage collect or
208.      # network drop.
209.      acceptable-heartbeat-pause = 10 s
210. 
211. 
212.      # How often to check for nodes marked as unreachable by the failure
213.      # detector
214.      unreachable-nodes-reaper-interval = 1s
215. 
216.      # After the heartbeat request has been sent the first failure detection
217.      # will start after this period, even though no heartbeat mesage has
218.      # been received.
219.      expected-response-after = 1 s
220. 
221.    }
222.    
223.    # remote deployment configuration section
224.    deployment {
225.      # If true, will only allow specific classes to be instanciated on this system via remote deployment
226.      enable-whitelist = off
227.      
228.      whitelist = []
229.    }
230. 
231.    ### Configuration for Artery, the reimplementation of remoting
232.    artery {
233. 
234.      # Enable the new remoting with this flag
235.      enabled = off
236. 
237.      # Canonical address is the address other clients should connect to.
238.      # Artery transport will expect messages to this address.
239.      canonical {
240. 
241.        # The default remote server port clients should connect to.
242.        # Default is 25520, use 0 if you want a random available port
243.        # This port needs to be unique for each actor system on the same machine.
244.        port = 25520
245. 
246.        # Hostname clients should connect to. Can be set to an ip, hostname
247.        # or one of the following special values:
248.        #   ""   InetAddress.getLocalHost.getHostAddress
249.        #   ""      InetAddress.getLocalHost.getHostName
250.        #
251.        hostname = ""
252.      }
253. 
254.      # Use these settings to bind a network interface to a different address
255.      # than artery expects messages at. This may be used when running Akka
256.      # nodes in a separated networks (under NATs or in containers). If canonical
257.      # and bind addresses are different, then network configuration that relays
258.      # communications from canonical to bind addresses is expected.
259.      bind {
260. 
261.        # Port to bind a network interface to. Can be set to a port number
262.        # of one of the following special values:
263.        #   0    random available port
264.        #   ""   akka.remote.artery.canonical.port
265.        #
266.        port = ""
267. 
268.        # Hostname to bind a network interface to. Can be set to an ip, hostname
269.        # or one of the following special values:
270.        #   "0.0.0.0"            all interfaces
271.        #   ""                   akka.remote.artery.canonical.hostname
272.        #   ""   InetAddress.getLocalHost.getHostAddress
273.        #   ""      InetAddress.getLocalHost.getHostName
274.        #
275.        hostname = ""
276.      }
277. 
278.      # Actor paths to use the large message stream for when a message
279.      # is sent to them over remoting. The large message stream dedicated
280.      # is separate from "normal" and system messages so that sending a
281.      # large message does not interfere with them.
282.      # Entries should be the full path to the actor. Wildcards in the form of "*"
283.      # can be supplied at any place and matches any name at that segment -
284.      # "/user/supervisor/actor/*" will match any direct child to actor,
285.      # while "/supervisor/*/child" will match any grandchild to "supervisor" that
286.      # has the name "child"
287.      # Messages sent to ActorSelections will not be passed through the large message
288.      # stream, to pass such messages through the large message stream the selections
289.      # but must be resolved to ActorRefs first.
290.      large-message-destinations = []
291. 
292.      # Enable untrusted mode, which discards inbound system messages, PossiblyHarmful and
293.      # ActorSelection messages. E.g. remote watch and remote deployment will not work.
294.      # ActorSelection messages can be enabled for specific paths with the trusted-selection-paths
295.      untrusted-mode = off
296. 
297.      # When 'untrusted-mode=on' inbound actor selections are by default discarded.
298.      # Actors with paths defined in this white list are granted permission to receive actor
299.      # selections messages.
300.      # E.g. trusted-selection-paths = ["/user/receptionist", "/user/namingService"]
301.      trusted-selection-paths = []
302. 
303.      # If this is "on", all inbound remote messages will be logged at DEBUG level,
304.      # if off then they are not logged
305.      log-received-messages = off
306. 
307.      # If this is "on", all outbound remote messages will be logged at DEBUG level,
308.      # if off then they are not logged
309.      log-sent-messages = off
310. 
311.      advanced {
312. 
313.        # Maximum serialized message size, including header data.
314.        maximum-frame-size = 256 KiB
315. 
316.        # Direct byte buffers are reused in a pool with this maximum size.
317.        # Each buffer has the size of 'maximum-frame-size'.
318.        # This is not a hard upper limit on number of created buffers. Additional
319.        # buffers will be created if needed, e.g. when using many outbound
320.        # associations at the same time. Such additional buffers will be garbage
321.        # collected, which is not as efficient as reusing buffers in the pool.
322.        buffer-pool-size = 128
323. 
324.        # Maximum serialized message size for the large messages, including header data.
325.        # See 'large-message-destinations'.
326.        maximum-large-frame-size = 2 MiB
327. 
328.        # Direct byte buffers for the large messages are reused in a pool with this maximum size.
329.        # Each buffer has the size of 'maximum-large-frame-size'.
330.        # See 'large-message-destinations'.
331.        # This is not a hard upper limit on number of created buffers. Additional
332.        # buffers will be created if needed, e.g. when using many outbound
333.        # associations at the same time. Such additional buffers will be garbage
334.        # collected, which is not as efficient as reusing buffers in the pool.
335.        large-buffer-pool-size = 32
336. 
337.        # For enabling testing features, such as blackhole in akka-remote-testkit.
338.        test-mode = off
339. 
340.        # Settings for the materializer that is used for the remote streams.
341.        materializer = ${akka.stream.materializer}
342. 
343.        # If set to a nonempty string artery will use the given dispatcher for
344.        # the ordinary and large message streams, otherwise the default dispatcher is used.
345.        use-dispatcher = "akka.remote.default-remote-dispatcher"
346. 
347.        # If set to a nonempty string remoting will use the given dispatcher for
348.        # the control stream, otherwise the default dispatcher is used.
349.        # It can be good to not use the same dispatcher for the control stream as
350.        # the dispatcher for the ordinary message stream so that heartbeat messages
351.        # are not disturbed.
352.        use-control-stream-dispatcher = ""
353. 
354.        # Controls whether to start the Aeron media driver in the same JVM or use external
355.        # process. Set to 'off' when using external media driver, and then also set the
356.        # 'aeron-dir'.
357.        embedded-media-driver = on
358. 
359.        # Directory used by the Aeron media driver. It's mandatory to define the 'aeron-dir'
360.        # if using external media driver, i.e. when 'embedded-media-driver = off'.
361.        # Embedded media driver will use a this directory, or a temporary directory if this
362.        # property is not defined (empty).
363.        aeron-dir = ""
364. 
365.        # Whether to delete aeron embeded driver directory upon driver stop.
366.        delete-aeron-dir = yes
367. 
368.        # Level of CPU time used, on a scale between 1 and 10, during backoff/idle.
369.        # The tradeoff is that to have low latency more CPU time must be used to be
370.        # able to react quickly on incoming messages or send as fast as possible after
371.        # backoff backpressure.
372.        # Level 1 strongly prefer low CPU consumption over low latency.
373.        # Level 10 strongly prefer low latency over low CPU consumption.
374.        idle-cpu-level = 5
375. 
376.        # WARNING: This feature is not supported yet. Don't use other value than 1.
377.        # It requires more hardening and performance optimizations.
378.        # Number of outbound lanes for each outbound association. A value greater than 1
379.        # means that serialization can be performed in parallel for different destination
380.        # actors. The selection of lane is based on consistent hashing of the recipient
381.        # ActorRef to preserve message ordering per receiver.
382.        outbound-lanes = 1
383. 
384.        # WARNING: This feature is not supported yet. Don't use other value than 1.
385.        # It requires more hardening and performance optimizations.
386.        # Total number of inbound lanes, shared among all inbound associations. A value
387.        # greater than 1 means that deserialization can be performed in parallel for
388.        # different destination actors. The selection of lane is based on consistent
389.        # hashing of the recipient ActorRef to preserve message ordering per receiver.
390.        inbound-lanes = 1
391. 
392.        # Size of the send queue for outgoing messages. Messages will be dropped if
393.        # the queue becomes full. This may happen if you send a burst of many messages
394.        # without end-to-end flow control. Note that there is one such queue per
395.        # outbound association. The trade-off of using a larger queue size is that
396.        # it consumes more memory, since the queue is based on preallocated array with
397.        # fixed size.
398.        outbound-message-queue-size = 3072
399. 
400.        # Size of the send queue for outgoing control messages, such as system messages.
401.        # If this limit is reached the remote system is declared to be dead and its UID
402.        # marked as quarantined.
403.        # The trade-off of using a larger queue size is that it consumes more memory,
404.        # since the queue is based on preallocated array with fixed size.
405.        outbound-control-queue-size = 3072
406. 
407.        # Size of the send queue for outgoing large messages. Messages will be dropped if
408.        # the queue becomes full. This may happen if you send a burst of many messages
409.        # without end-to-end flow control. Note that there is one such queue per
410.        # outbound association. The trade-off of using a larger queue size is that
411.        # it consumes more memory, since the queue is based on preallocated array with
412.        # fixed size.
413.        outbound-large-message-queue-size = 256
414. 
415.        # This setting defines the maximum number of unacknowledged system messages
416.        # allowed for a remote system. If this limit is reached the remote system is
417.        # declared to be dead and its UID marked as quarantined.
418.        system-message-buffer-size = 20000
419. 
420.        # unacknowledged system messages are re-delivered with this interval
421.        system-message-resend-interval = 1 second
422. 
423.        # The timeout for outbound associations to perform the handshake.
424.        # This timeout must be greater than the 'image-liveness-timeout'.
425.        handshake-timeout = 20 s
426. 
427.        # incomplete handshake attempt is retried with this interval
428.        handshake-retry-interval = 1 second
429. 
430.        # handshake requests are performed periodically with this interval,
431.        # also after the handshake has been completed to be able to establish
432.        # a new session with a restarted destination system
433.        inject-handshake-interval = 1 second
434. 
435.        # messages that are not accepted by Aeron are dropped after retrying for this period
436.        give-up-message-after = 60 seconds
437. 
438.        # System messages that are not acknowledged after re-sending for this period are
439.        # dropped and will trigger quarantine. The value should be longer than the length
440.        # of a network partition that you need to survive.
441.        give-up-system-message-after = 6 hours
442. 
443.        # during ActorSystem termination the remoting will wait this long for
444.        # an acknowledgment by the destination system that flushing of outstanding
445.        # remote messages has been completed
446.        shutdown-flush-timeout = 1 second
447. 
448.        # See 'inbound-max-restarts'
449.        inbound-restart-timeout = 5 seconds
450. 
451.        # Max number of restarts within 'inbound-restart-timeout' for the inbound streams.
452.        # If more restarts occurs the ActorSystem will be terminated.
453.        inbound-max-restarts = 5
454. 
455.        # See 'outbound-max-restarts'
456.        outbound-restart-timeout = 5 seconds
457. 
458.        # Max number of restarts within 'outbound-restart-timeout' for the outbound streams.
459.        # If more restarts occurs the ActorSystem will be terminated.
460.        outbound-max-restarts = 5
461. 
462.        # Stop outbound stream of a quarantined association after this idle timeout, i.e.
463.        # when not used any more.
464.        stop-quarantined-after-idle = 3 seconds
465. 
466.        # Timeout after which aeron driver has not had keepalive messages
467.        # from a client before it considers the client dead.
468.        client-liveness-timeout = 20 seconds
469. 
470.        # Timeout for each the INACTIVE and LINGER stages an aeron image
471.        # will be retained for when it is no longer referenced.
472.        # This timeout must be less than the 'handshake-timeout'.
473.        image-liveness-timeout = 10 seconds
474. 
475.        # Timeout after which the aeron driver is considered dead
476.        # if it does not update its C'n'C timestamp.
477.        driver-timeout = 20 seconds
478. 
479.        flight-recorder {
480.          // FIXME it should be enabled by default when we have a good solution for naming the files
481.          enabled = off
482.          # Controls where the flight recorder file will be written. There are three options:
483.          # 1. Empty: a file will be generated in the temporary directory of the OS
484.          # 2. A relative or absolute path ending with ".afr": this file will be used
485.          # 3. A relative or absolute path: this directory will be used, the file will get a random file name
486.          destination = ""
487.        }
488. 
489.        # compression of common strings in remoting messages, like actor destinations, serializers etc
490.        compression {
491. 
492.          actor-refs {
493.            # Max number of compressed actor-refs
494.            # Note that compression tables are "rolling" (i.e. a new table replaces the old
495.            # compression table once in a while), and this setting is only about the total number
496.            # of compressions within a single such table.
497.            # Must be a positive natural number.
498.            max = 256
499. 
500.            # interval between new table compression advertisements.
501.            # this means the time during which we collect heavy-hitter data and then turn it into a compression table.
502.            advertisement-interval = 1 minute # TODO find good number as default, for benchmarks trigger immediately
503.          }
504.          manifests {
505.            # Max number of compressed manifests
506.            # Note that compression tables are "rolling" (i.e. a new table replaces the old
507.            # compression table once in a while), and this setting is only about the total number
508.            # of compressions within a single such table.
509.            # Must be a positive natural number.
510.            max = 256
511. 
512.            # interval between new table compression advertisements.
513.            # this means the time during which we collect heavy-hitter data and then turn it into a compression table.
514.            advertisement-interval = 1 minute # TODO find good number as default, for benchmarks trigger immediately
515.          }
516.        }
517. 
518.        # List of fully qualified class names of remote instruments which should
519.        # be initialized and used for monitoring of remote messages.
520.        # The class must extend akka.remote.artery.RemoteInstrument and
521.        # have a public constructor with empty parameters or one ExtendedActorSystem
522.        # parameter.
523.        # A new instance of RemoteInstrument will be created for each encoder and decoder.
524.        # It's only called from the stage, so if it dosn't delegate to any shared instance
525.        # it doesn't have to be thread-safe.
526.        # Refer to `akka.remote.artery.RemoteInstrument` for more information.
527.        instruments = ${?akka.remote.artery.advanced.instruments} []
528.      }
529.    }
530.  }
531. 
532.}

akka-testkit

1.######################################
2.# Akka Testkit Reference Config File #
3.######################################

5.# This is the reference config file that contains all the default settings.
6.# Make your edits/overrides in your application.conf.

8.akka {

  1. test {
  2. factor by which to scale timeouts during tests, e.g. to account for shared

  3. build system load

  4. timefactor = 1.0
  5. duration of EventFilter.intercept waits after the block is finished until

  6. all required messages are received

  7. filter-leeway = 3s
  8. duration to wait in expectMsg and friends outside of within() block

  9. by default

  10. single-expect-default = 3s
  11. The timeout that is added as an implicit by DefaultTimeout trait

  12. default-timeout = 5s
  13. calling-thread-dispatcher {
  14.  type = akka.testkit.CallingThreadDispatcherConfigurator
    
  15. }
  16. }
  17. actor.serialization-bindings {
  18. "akka.testkit.JavaSerializable" = java
  19. }
    33.}

你可能感兴趣的:(Akka手册译(一)——配置(3))