Configuration
Loading

Configuration

You can start using Akka without defining any configuration, since sensible default values are provided. Later on you might need to amend the settings to change the default behavior or adapt for specific runtime environments. Typical examples of settings that you might amend:

  • log level and logger backend
  • enable remoting
  • message serializers
  • definition of routers
  • tuning of dispatchers

Akka uses the Typesafe Config Library, which might also be a good choice for the configuration of your own application or library built with or without Akka. This library is implemented in Java with no external dependencies; you should have a look at its documentation (in particular about ConfigFactory), which is only summarized in the following.

Warning

If you use Akka from the Scala REPL from the 2.9.x series, and you do not provide your own ClassLoader to the ActorSystem, start the REPL with "-Yrepl-sync" to work around a deficiency in the REPLs provided Context ClassLoader.

Where configuration is read from

All configuration for Akka is held within instances of ActorSystem, or put differently, as viewed from the outside, ActorSystem is the only consumer of configuration information. While constructing an actor system, you can either pass in a Config object or not, where the second case is equivalent to passing ConfigFactory.load() (with the right class loader). This means roughly that the default is to parse all application.conf, application.json and application.properties found at the root of the class path—please refer to the aforementioned documentation for details. The actor system then merges in all reference.conf resources found at the root of the class path to form the fallback configuration, i.e. it internally uses

  1. appConfig.withFallback(ConfigFactory.defaultReference(classLoader))

The philosophy is that code never contains default values, but instead relies upon their presence in the reference.conf supplied with the library in question.

Highest precedence is given to overrides given as system properties, see the HOCON specification (near the bottom). Also noteworthy is that the application configuration—which defaults to application—may be overridden using the config.resource property (there are more, please refer to the Config docs).

Note

If you are writing an Akka application, keep you configuration in application.conf at the root of the class path. If you are writing an Akka-based library, keep its configuration in reference.conf at the root of the JAR file.

When using JarJar, OneJar, Assembly or any jar-bundler

Warning

Akka's configuration approach relies heavily on the notion of every module/jar having its own reference.conf file, all of these will be discovered by the configuration and loaded. Unfortunately this also means that if you put/merge multiple jars into the same jar, you need to merge all the reference.confs as well. Otherwise all defaults will be lost and Akka will not function.

Custom application.conf

A custom application.conf might look like this:

  1. # In this file you can override any option defined in the reference files.
  2. # Copy in parts of the reference files and modify as you please.
  3.  
  4. akka {
  5.  
  6. # Loggers to register at boot time (akka.event.Logging$DefaultLogger logs
  7. # to STDOUT)
  8. loggers = ["akka.event.slf4j.Slf4jLogger"]
  9.  
  10. # Log level used by the configured loggers (see "loggers") as soon
  11. # as they have been started; before that, see "stdout-loglevel"
  12. # Options: OFF, ERROR, WARNING, INFO, DEBUG
  13. loglevel = "DEBUG"
  14.  
  15. # Log level for the very basic logger activated during AkkaApplication startup
  16. # Options: OFF, ERROR, WARNING, INFO, DEBUG
  17. stdout-loglevel = "DEBUG"
  18.  
  19. actor {
  20. default-dispatcher {
  21. # Throughput for default Dispatcher, set to 1 for as fair as possible
  22. throughput = 10
  23. }
  24. }
  25.  
  26. remote {
  27. server {
  28. # The port clients should connect to. Default is 2552 (AKKA)
  29. port = 2562
  30. }
  31. }
  32. }

Including files

Sometimes it can be useful to include another configuration file, for example if you have one application.conf with all environment independent settings and then override some settings for specific environments.

Specifying system property with -Dconfig.resource=/dev.conf will load the dev.conf file, which includes the application.conf

dev.conf:

  1. include "application"
  2.  
  3. akka {
  4. loglevel = "DEBUG"
  5. }

More advanced include and substitution mechanisms are explained in the HOCON specification.

Logging of Configuration

If the system or config property akka.log-config-on-start is set to on, then the complete configuration at INFO level when the actor system is started. This is useful when you are uncertain of what configuration is used.

If in doubt, you can also easily and nicely inspect configuration objects before or after using them to construct an actor system:

  1. Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_27).
  2. Type in expressions to have them evaluated.
  3. Type :help for more information.
  4.  
  5. scala> import com.typesafe.config._
  6. import com.typesafe.config._
  7.  
  8. scala> ConfigFactory.parseString("a.b=12")
  9. res0: com.typesafe.config.Config = Config(SimpleConfigObject({"a" : {"b" : 12}}))
  10.  
  11. scala> res0.root.render
  12. res1: java.lang.String =
  13. {
  14. # String: 1
  15. "a" : {
  16. # String: 1
  17. "b" : 12
  18. }
  19. }

The comments preceding every item give detailed information about the origin of the setting (file & line number) plus possible comments which were present, e.g. in the reference configuration. The settings as merged with the reference and parsed by the actor system can be displayed like this:

  1. final ActorSystem system = ActorSystem.create();
  2. System.out.println(system.settings());
  3. // this is a shortcut for system.settings().config().root().render()

A Word About ClassLoaders

In several places of the configuration file it is possible to specify the fully-qualified class name of something to be instantiated by Akka. This is done using Java reflection, which in turn uses a ClassLoader. Getting the right one in challenging environments like application containers or OSGi bundles is not always trivial, the current approach of Akka is that each ActorSystem implementation stores the current thread’s context class loader (if available, otherwise just its own loader as in this.getClass.getClassLoader) and uses that for all reflective accesses. This implies that putting Akka on the boot class path will yield NullPointerException from strange places: this is simply not supported.

Application specific settings

The configuration can also be used for application specific settings. A good practice is to place those settings in an Extension, as described in:

Configuring multiple ActorSystem

If you have more than one ActorSystem (or you're writing a library and have an ActorSystem that may be separate from the application's) you may want to separate the configuration for each system.

Given that ConfigFactory.load() merges all resources with matching name from the whole class path, it is easiest to utilize that functionality and differentiate actor systems within the hierarchy of the configuration:

  1. myapp1 {
  2. akka.loglevel = "WARNING"
  3. my.own.setting = 43
  4. }
  5. myapp2 {
  6. akka.loglevel = "ERROR"
  7. app2.setting = "appname"
  8. }
  9. my.own.setting = 42
  10. my.other.setting = "hello"
  1. val config = ConfigFactory.load()
  2. val app1 = ActorSystem("MyApp1", config.getConfig("myapp1").withFallback(config))
  3. val app2 = ActorSystem("MyApp2",
  4. config.getConfig("myapp2").withOnlyPath("akka").withFallback(config))

These two samples demonstrate different variations of the “lift-a-subtree” trick: in the first case, the configuration accessible from within the actor system is this

  1. akka.loglevel = "WARNING"
  2. my.own.setting = 43
  3. my.other.setting = "hello"
  4. // plus myapp1 and myapp2 subtrees

while in the second one, only the “akka” subtree is lifted, with the following result

  1. akka.loglevel = "ERROR"
  2. my.own.setting = 42
  3. my.other.setting = "hello"
  4. // plus myapp1 and myapp2 subtrees

Note

The configuration library is really powerful, explaining all features exceeds the scope affordable here. In particular not covered are how to include other configuration files within other files (see a small example at Including files) and copying parts of the configuration tree by way of path substitutions.

You may also specify and parse the configuration programmatically in other ways when instantiating the ActorSystem.

  1. import akka.actor.ActorSystem
  2. import com.typesafe.config.ConfigFactory
  3. val customConf = ConfigFactory.parseString("""
  4. akka.actor.deployment {
  5. /my-service {
  6. router = round-robin
  7. nr-of-instances = 3
  8. }
  9. }
  10. """)
  11. // ConfigFactory.load sandwiches customConfig between default reference
  12. // config and default overrides, and then resolves it.
  13. val system = ActorSystem("MySystem", ConfigFactory.load(customConf))

Reading configuration from a custom location

You can replace or supplement application.conf either in code or using system properties.

If you're using ConfigFactory.load() (which Akka does by default) you can replace application.conf by defining -Dconfig.resource=whatever, -Dconfig.file=whatever, or -Dconfig.url=whatever.

From inside your replacement file specified with -Dconfig.resource and friends, you can include "application" if you still want to use application.{conf,json,properties} as well. Settings specified before include "application" would be overridden by the included file, while those after would override the included file.

In code, there are many customization options.

There are several overloads of ConfigFactory.load(); these allow you to specify something to be sandwiched between system properties (which override) and the defaults (from reference.conf), replacing the usual application.{conf,json,properties} and replacing -Dconfig.file and friends.

The simplest variant of ConfigFactory.load() takes a resource basename (instead of application); myname.conf, myname.json, and myname.properties would then be used instead of application.{conf,json,properties}.

The most flexible variant takes a Config object, which you can load using any method in ConfigFactory. For example you could put a config string in code using ConfigFactory.parseString() or you could make a map and ConfigFactory.parseMap(), or you could load a file.

You can also combine your custom config with the usual config, that might look like:

  1. // make a Config with just your special setting
  2. Config myConfig =
  3. ConfigFactory.parseString("something=somethingElse");
  4. // load the normal config stack (system props,
  5. // then application.conf, then reference.conf)
  6. Config regularConfig =
  7. ConfigFactory.load();
  8. // override regular stack with myConfig
  9. Config combined =
  10. myConfig.withFallback(regularConfig);
  11. // put the result in between the overrides
  12. // (system props) and defaults again
  13. Config complete =
  14. ConfigFactory.load(combined);
  15. // create ActorSystem
  16. ActorSystem system =
  17. ActorSystem.create("myname", complete);

When working with Config objects, keep in mind that there are three "layers" in the cake:

  • ConfigFactory.defaultOverrides() (system properties)
  • the app's settings
  • ConfigFactory.defaultReference() (reference.conf)

The normal goal is to customize the middle layer while leaving the other two alone.

  • ConfigFactory.load() loads the whole stack
  • the overloads of ConfigFactory.load() let you specify a different middle layer
  • the ConfigFactory.parse() variations load single files or resources

To stack two layers, use override.withFallback(fallback); try to keep system props (defaultOverrides()) on top and reference.conf (defaultReference()) on the bottom.

Do keep in mind, you can often just add another include statement in application.conf rather than writing code. Includes at the top of application.conf will be overridden by the rest of application.conf, while those at the bottom will override the earlier stuff.

Listing of the Reference Configuration

Each Akka module has a reference configuration file with the default values.

akka-actor

  1. ####################################
  2. # Akka Actor 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. akka {
  9. # Akka version, checked against the runtime version of Akka.
  10. version = "2.2.5"
  11.  
  12. # Home directory of Akka, modules in the deploy directory will be loaded
  13. home = ""
  14.  
  15. # Loggers to register at boot time (akka.event.Logging$DefaultLogger logs
  16. # to STDOUT)
  17. loggers = ["akka.event.Logging$DefaultLogger"]
  18.  
  19. # Deprecated, use akka.loggers.
  20. event-handlers = []
  21.  
  22. # Loggers are created and registered synchronously during ActorSystem
  23. # start-up, and since they are actors, this timeout is used to bound the
  24. # waiting time
  25. logger-startup-timeout = 5s
  26.  
  27. # Deprecated, use akka.logger-startup-timeout
  28. event-handler-startup-timeout = -1s
  29.  
  30. # Log level used by the configured loggers (see "loggers") as soon
  31. # as they have been started; before that, see "stdout-loglevel"
  32. # Options: OFF, ERROR, WARNING, INFO, DEBUG
  33. loglevel = "INFO"
  34.  
  35. # Log level for the very basic logger activated during AkkaApplication startup
  36. # Options: OFF, ERROR, WARNING, INFO, DEBUG
  37. stdout-loglevel = "WARNING"
  38.  
  39. # Log the complete configuration at INFO level when the actor system is started.
  40. # This is useful when you are uncertain of what configuration is used.
  41. log-config-on-start = off
  42.  
  43. # Log at info level when messages are sent to dead letters.
  44. # Possible values:
  45. # on: all dead letters are logged
  46. # off: no logging of dead letters
  47. # n: positive integer, number of dead letters that will be logged
  48. log-dead-letters = 10
  49.  
  50. # Possibility to turn off logging of dead letters while the actor system
  51. # is shutting down. Logging is only done when enabled by 'log-dead-letters'
  52. # setting.
  53. log-dead-letters-during-shutdown = on
  54.  
  55. # List FQCN of extensions which shall be loaded at actor system startup.
  56. # Should be on the format: 'extensions = ["foo", "bar"]' etc.
  57. # See the Akka Documentation for more info about Extensions
  58. extensions = []
  59.  
  60. # Toggles whether threads created by this ActorSystem should be daemons or not
  61. daemonic = off
  62.  
  63. # JVM shutdown, System.exit(-1), in case of a fatal error,
  64. # such as OutOfMemoryError
  65. jvm-exit-on-fatal-error = on
  66.  
  67. actor {
  68.  
  69. # FQCN of the ActorRefProvider to be used; the below is the built-in default,
  70. # another one is akka.remote.RemoteActorRefProvider in the akka-remote bundle.
  71. provider = "akka.actor.LocalActorRefProvider"
  72.  
  73. # The guardian "/user" will use this class to obtain its supervisorStrategy.
  74. # It needs to be a subclass of akka.actor.SupervisorStrategyConfigurator.
  75. # In addition to the default there is akka.actor.StoppingSupervisorStrategy.
  76. guardian-supervisor-strategy = "akka.actor.DefaultSupervisorStrategy"
  77.  
  78. # Timeout for ActorSystem.actorOf
  79. creation-timeout = 20s
  80.  
  81. # Frequency with which stopping actors are prodded in case they had to be
  82. # removed from their parents
  83. reaper-interval = 5s
  84.  
  85. # Serializes and deserializes (non-primitive) messages to ensure immutability,
  86. # this is only intended for testing.
  87. serialize-messages = off
  88.  
  89. # Serializes and deserializes creators (in Props) to ensure that they can be
  90. # sent over the network, this is only intended for testing. Purely local deployments
  91. # as marked with deploy.scope == LocalScope are exempt from verification.
  92. serialize-creators = off
  93.  
  94. # Timeout for send operations to top-level actors which are in the process
  95. # of being started. This is only relevant if using a bounded mailbox or the
  96. # CallingThreadDispatcher for a top-level actor.
  97. unstarted-push-timeout = 10s
  98.  
  99. typed {
  100. # Default timeout for typed actor methods with non-void return type
  101. timeout = 5s
  102. }
  103.  
  104. deployment {
  105.  
  106. # deployment id pattern - on the format: /parent/child etc.
  107. default {
  108.  
  109. # The id of the dispatcher to use for this actor.
  110. # If undefined or empty the dispatcher specified in code
  111. # (Props.withDispatcher) is used, or default-dispatcher if not
  112. # specified at all.
  113. dispatcher = ""
  114.  
  115. # The id of the mailbox to use for this actor.
  116. # If undefined or empty the default mailbox of the configured dispatcher
  117. # is used or if there is no mailbox configuration the mailbox specified
  118. # in code (Props.withMailbox) is used.
  119. # If there is a mailbox defined in the configured dispatcher then that
  120. # overrides this setting.
  121. mailbox = ""
  122.  
  123. # routing (load-balance) scheme to use
  124. # - available: "from-code", "round-robin", "random", "smallest-mailbox",
  125. # "scatter-gather", "broadcast"
  126. # - or: Fully qualified class name of the router class.
  127. # The class must extend akka.routing.CustomRouterConfig and
  128. # have a public constructor with com.typesafe.config.Config
  129. # parameter.
  130. # - default is "from-code";
  131. # Whether or not an actor is transformed to a Router is decided in code
  132. # only (Props.withRouter). The type of router can be overridden in the
  133. # configuration; specifying "from-code" means that the values specified
  134. # in the code shall be used.
  135. # In case of routing, the actors to be routed to can be specified
  136. # in several ways:
  137. # - nr-of-instances: will create that many children
  138. # - routees.paths: will look the paths up using actorFor and route to
  139. # them, i.e. will not create children
  140. # - resizer: dynamically resizable number of routees as specified in
  141. # resizer below
  142. router = "from-code"
  143.  
  144. # number of children to create in case of a router;
  145. # this setting is ignored if routees.paths is given
  146. nr-of-instances = 1
  147.  
  148. # within is the timeout used for routers containing future calls
  149. within = 5 seconds
  150.  
  151. # number of virtual nodes per node for consistent-hashing router
  152. virtual-nodes-factor = 10
  153.  
  154. routees {
  155. # Alternatively to giving nr-of-instances you can specify the full
  156. # paths of those actors which should be routed to. This setting takes
  157. # precedence over nr-of-instances
  158. paths = []
  159. }
  160.  
  161. # Routers with dynamically resizable number of routees; this feature is
  162. # enabled by including (parts of) this section in the deployment
  163. resizer {
  164.  
  165. # The fewest number of routees the router should ever have.
  166. lower-bound = 1
  167.  
  168. # The most number of routees the router should ever have.
  169. # Must be greater than or equal to lower-bound.
  170. upper-bound = 10
  171.  
  172. # Threshold used to evaluate if a routee is considered to be busy
  173. # (under pressure). Implementation depends on this value (default is 1).
  174. # 0: number of routees currently processing a message.
  175. # 1: number of routees currently processing a message has
  176. # some messages in mailbox.
  177. # > 1: number of routees with at least the configured pressure-threshold
  178. # messages in their mailbox. Note that estimating mailbox size of
  179. # default UnboundedMailbox is O(N) operation.
  180. pressure-threshold = 1
  181.  
  182. # Percentage to increase capacity whenever all routees are busy.
  183. # For example, 0.2 would increase 20% (rounded up), i.e. if current
  184. # capacity is 6 it will request an increase of 2 more routees.
  185. rampup-rate = 0.2
  186.  
  187. # Minimum fraction of busy routees before backing off.
  188. # For example, if this is 0.3, then we'll remove some routees only when
  189. # less than 30% of routees are busy, i.e. if current capacity is 10 and
  190. # 3 are busy then the capacity is unchanged, but if 2 or less are busy
  191. # the capacity is decreased.
  192. # Use 0.0 or negative to avoid removal of routees.
  193. backoff-threshold = 0.3
  194.  
  195. # Fraction of routees to be removed when the resizer reaches the
  196. # backoffThreshold.
  197. # For example, 0.1 would decrease 10% (rounded up), i.e. if current
  198. # capacity is 9 it will request an decrease of 1 routee.
  199. backoff-rate = 0.1
  200.  
  201. # When the resizer reduce the capacity the abandoned routee actors are
  202. # stopped with PoisonPill after this delay. The reason for the delay is
  203. # to give concurrent messages a chance to be placed in mailbox before
  204. # sending PoisonPill.
  205. # Use 0s to skip delay.
  206. stop-delay = 1s
  207.  
  208. # Number of messages between resize operation.
  209. # Use 1 to resize before each message.
  210. messages-per-resize = 10
  211. }
  212. }
  213. }
  214.  
  215. default-dispatcher {
  216. # Must be one of the following
  217. # Dispatcher, (BalancingDispatcher, only valid when all actors using it are
  218. # of the same type), PinnedDispatcher, or a FQCN to a class inheriting
  219. # MessageDispatcherConfigurator with a public constructor with
  220. # both com.typesafe.config.Config parameter and
  221. # akka.dispatch.DispatcherPrerequisites parameters.
  222. # PinnedDispatcher must be used toghether with executor=thread-pool-executor.
  223. type = "Dispatcher"
  224.  
  225. # Which kind of ExecutorService to use for this dispatcher
  226. # Valid options:
  227. # - "fork-join-executor" requires a "fork-join-executor" section
  228. # - "thread-pool-executor" requires a "thread-pool-executor" section
  229. # - A FQCN of a class extending ExecutorServiceConfigurator
  230. executor = "fork-join-executor"
  231.  
  232. # This will be used if you have set "executor = "fork-join-executor""
  233. fork-join-executor {
  234. # Min number of threads to cap factor-based parallelism number to
  235. parallelism-min = 8
  236.  
  237. # The parallelism factor is used to determine thread pool size using the
  238. # following formula: ceil(available processors * factor). Resulting size
  239. # is then bounded by the parallelism-min and parallelism-max values.
  240. parallelism-factor = 3.0
  241.  
  242. # Max number of threads to cap factor-based parallelism number to
  243. parallelism-max = 64
  244. }
  245.  
  246. # This will be used if you have set "executor = "thread-pool-executor""
  247. thread-pool-executor {
  248. # Keep alive time for threads
  249. keep-alive-time = 60s
  250.  
  251. # Min number of threads to cap factor-based core number to
  252. core-pool-size-min = 8
  253.  
  254. # The core pool size factor is used to determine thread pool core size
  255. # using the following formula: ceil(available processors * factor).
  256. # Resulting size is then bounded by the core-pool-size-min and
  257. # core-pool-size-max values.
  258. core-pool-size-factor = 3.0
  259.  
  260. # Max number of threads to cap factor-based number to
  261. core-pool-size-max = 64
  262.  
  263. # Minimum number of threads to cap factor-based max number to
  264. # (if using a bounded task queue)
  265. max-pool-size-min = 8
  266.  
  267. # Max no of threads (if using a bounded task queue) is determined by
  268. # calculating: ceil(available processors * factor)
  269. max-pool-size-factor = 3.0
  270.  
  271. # Max number of threads to cap factor-based max number to
  272. # (if using a bounded task queue)
  273. max-pool-size-max = 64
  274.  
  275. # Specifies the bounded capacity of the task queue (< 1 == unbounded)
  276. task-queue-size = -1
  277.  
  278. # Specifies which type of task queue will be used, can be "array" or
  279. # "linked" (default)
  280. task-queue-type = "linked"
  281.  
  282. # Allow core threads to time out
  283. allow-core-timeout = on
  284. }
  285.  
  286. # How long time the dispatcher will wait for new actors until it shuts down
  287. shutdown-timeout = 1s
  288.  
  289. # Throughput defines the number of messages that are processed in a batch
  290. # before the thread is returned to the pool. Set to 1 for as fair as possible.
  291. throughput = 5
  292.  
  293. # Throughput deadline for Dispatcher, set to 0 or negative for no deadline
  294. throughput-deadline-time = 0ms
  295.  
  296. # For BalancingDispatcher: If the balancing dispatcher should attempt to
  297. # schedule idle actors using the same dispatcher when a message comes in,
  298. # and the dispatchers ExecutorService is not fully busy already.
  299. attempt-teamwork = on
  300.  
  301. # If this dispatcher requires a specific type of mailbox, specify the
  302. # fully-qualified class name here; the actually created mailbox will
  303. # be a subtype of this type. The empty string signifies no requirement.
  304. mailbox-requirement = ""
  305. }
  306.  
  307. default-mailbox {
  308. # FQCN of the MailboxType. The Class of the FQCN must have a public
  309. # constructor with
  310. # (akka.actor.ActorSystem.Settings, com.typesafe.config.Config) parameters.
  311. mailbox-type = "akka.dispatch.UnboundedMailbox"
  312.  
  313. # If the mailbox is bounded then it uses this setting to determine its
  314. # capacity. The provided value must be positive.
  315. # NOTICE:
  316. # Up to version 2.1 the mailbox type was determined based on this setting;
  317. # this is no longer the case, the type must explicitly be a bounded mailbox.
  318. mailbox-capacity = 1000
  319.  
  320. # If the mailbox is bounded then this is the timeout for enqueueing
  321. # in case the mailbox is full. Negative values signify infinite
  322. # timeout, which should be avoided as it bears the risk of dead-lock.
  323. mailbox-push-timeout-time = 10s
  324.  
  325. # For Actor with Stash: The default capacity of the stash.
  326. # If negative (or zero) then an unbounded stash is used (default)
  327. # If positive then a bounded stash is used and the capacity is set using
  328. # the property
  329. stash-capacity = -1
  330. }
  331.  
  332. mailbox {
  333. # Mapping between message queue semantics and mailbox configurations.
  334. # Used by akka.dispatch.RequiresMessageQueue[T] to enforce different
  335. # mailbox types on actors.
  336. # If your Actor implements RequiresMessageQueue[T], then when you create
  337. # an instance of that actor its mailbox type will be decided by looking
  338. # up a mailbox configuration via T in this mapping
  339. requirements {
  340. "akka.dispatch.UnboundedMessageQueueSemantics" =
  341. akka.actor.mailbox.unbounded-queue-based
  342. "akka.dispatch.BoundedMessageQueueSemantics" =
  343. akka.actor.mailbox.bounded-queue-based
  344. "akka.dispatch.DequeBasedMessageQueueSemantics" =
  345. akka.actor.mailbox.unbounded-deque-based
  346. "akka.dispatch.UnboundedDequeBasedMessageQueueSemantics" =
  347. akka.actor.mailbox.unbounded-deque-based
  348. "akka.dispatch.BoundedDequeBasedMessageQueueSemantics" =
  349. akka.actor.mailbox.bounded-deque-based
  350. "akka.dispatch.MultipleConsumerSemantics" =
  351. akka.actor.mailbox.unbounded-queue-based
  352. }
  353.  
  354. unbounded-queue-based {
  355. # FQCN of the MailboxType, The Class of the FQCN must have a public
  356. # constructor with (akka.actor.ActorSystem.Settings,
  357. # com.typesafe.config.Config) parameters.
  358. mailbox-type = "akka.dispatch.UnboundedMailbox"
  359. }
  360.  
  361. bounded-queue-based {
  362. # FQCN of the MailboxType, The Class of the FQCN must have a public
  363. # constructor with (akka.actor.ActorSystem.Settings,
  364. # com.typesafe.config.Config) parameters.
  365. mailbox-type = "akka.dispatch.BoundedMailbox"
  366. }
  367.  
  368. unbounded-deque-based {
  369. # FQCN of the MailboxType, The Class of the FQCN must have a public
  370. # constructor with (akka.actor.ActorSystem.Settings,
  371. # com.typesafe.config.Config) parameters.
  372. mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox"
  373. }
  374.  
  375. bounded-deque-based {
  376. # FQCN of the MailboxType, The Class of the FQCN must have a public
  377. # constructor with (akka.actor.ActorSystem.Settings,
  378. # com.typesafe.config.Config) parameters.
  379. mailbox-type = "akka.dispatch.BoundedDequeBasedMailbox"
  380. }
  381. }
  382.  
  383. debug {
  384. # enable function of Actor.loggable(), which is to log any received message
  385. # at DEBUG level, see the “Testing Actor Systems” section of the Akka
  386. # Documentation at https://akka.io/docs
  387. receive = off
  388.  
  389. # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill et.c.)
  390. autoreceive = off
  391.  
  392. # enable DEBUG logging of actor lifecycle changes
  393. lifecycle = off
  394.  
  395. # enable DEBUG logging of all LoggingFSMs for events, transitions and timers
  396. fsm = off
  397.  
  398. # enable DEBUG logging of subscription changes on the eventStream
  399. event-stream = off
  400.  
  401. # enable DEBUG logging of unhandled messages
  402. unhandled = off
  403.  
  404. # enable WARN logging of misconfigured routers
  405. router-misconfiguration = off
  406. }
  407.  
  408. # Entries for pluggable serializers and their bindings.
  409. serializers {
  410. java = "akka.serialization.JavaSerializer"
  411. bytes = "akka.serialization.ByteArraySerializer"
  412. }
  413.  
  414. # Class to Serializer binding. You only need to specify the name of an
  415. # interface or abstract base class of the messages. In case of ambiguity it
  416. # is using the most specific configured class, or giving a warning and
  417. # choosing the “first” one.
  418. #
  419. # To disable one of the default serializers, assign its class to "none", like
  420. # "java.io.Serializable" = none
  421. serialization-bindings {
  422. "[B" = bytes
  423. "java.io.Serializable" = java
  424. }
  425.  
  426. # Configuration items which are used by the akka.actor.ActorDSL._ methods
  427. dsl {
  428. # Maximum queue size of the actor created by newInbox(); this protects
  429. # against faulty programs which use select() and consistently miss messages
  430. inbox-size = 1000
  431.  
  432. # Default timeout to assume for operations like Inbox.receive et al
  433. default-timeout = 5s
  434. }
  435. }
  436.  
  437. # Used to set the behavior of the scheduler.
  438. # Changing the default values may change the system behavior drastically so make
  439. # sure you know what you're doing! See the Scheduler section of the Akka
  440. # Documentation for more details.
  441. scheduler {
  442. # The LightArrayRevolverScheduler is used as the default scheduler in the
  443. # system. It does not execute the scheduled tasks on exact time, but on every
  444. # tick, it will run everything that is (over)due. You can increase or decrease
  445. # the accuracy of the execution timing by specifying smaller or larger tick
  446. # duration. If you are scheduling a lot of tasks you should consider increasing
  447. # the ticks per wheel.
  448. # Note that it might take up to 1 tick to stop the Timer, so setting the
  449. # tick-duration to a high value will make shutting down the actor system
  450. # take longer.
  451. tick-duration = 10ms
  452.  
  453. # The timer uses a circular wheel of buckets to store the timer tasks.
  454. # This should be set such that the majority of scheduled timeouts (for high
  455. # scheduling frequency) will be shorter than one rotation of the wheel
  456. # (ticks-per-wheel * ticks-duration)
  457. # THIS MUST BE A POWER OF TWO!
  458. ticks-per-wheel = 512
  459.  
  460. # This setting selects the timer implementation which shall be loaded at
  461. # system start-up. Built-in choices are:
  462. # - akka.actor.LightArrayRevolverScheduler
  463. # - akka.actor.DefaultScheduler (HWT) DEPRECATED
  464. # The class given here must implement the akka.actor.Scheduler interface
  465. # and offer a public constructor which takes three arguments:
  466. # 1) com.typesafe.config.Config
  467. # 2) akka.event.LoggingAdapter
  468. # 3) java.util.concurrent.ThreadFactory
  469. implementation = akka.actor.LightArrayRevolverScheduler
  470.  
  471. # When shutting down the scheduler, there will typically be a thread which
  472. # needs to be stopped, and this timeout determines how long to wait for
  473. # that to happen. In case of timeout the shutdown of the actor system will
  474. # proceed without running possibly still enqueued tasks.
  475. shutdown-timeout = 5s
  476. }
  477.  
  478. io {
  479.  
  480. # By default the select loops run on dedicated threads, hence using a
  481. # PinnedDispatcher
  482. pinned-dispatcher {
  483. type = "PinnedDispatcher"
  484. executor = "thread-pool-executor"
  485. thread-pool-executor.allow-core-pool-timeout = off
  486. }
  487.  
  488. tcp {
  489.  
  490. # The number of selectors to stripe the served channels over; each of
  491. # these will use one select loop on the selector-dispatcher.
  492. nr-of-selectors = 1
  493.  
  494. # Maximum number of open channels supported by this TCP module; there is
  495. # no intrinsic general limit, this setting is meant to enable DoS
  496. # protection by limiting the number of concurrently connected clients.
  497. # Also note that this is a "soft" limit; in certain cases the implementation
  498. # will accept a few connections more or a few less than the number configured
  499. # here. Must be an integer > 0 or "unlimited".
  500. max-channels = 256000
  501.  
  502. # When trying to assign a new connection to a selector and the chosen
  503. # selector is at full capacity, retry selector choosing and assignment
  504. # this many times before giving up
  505. selector-association-retries = 10
  506.  
  507. # The maximum number of connection that are accepted in one go,
  508. # higher numbers decrease latency, lower numbers increase fairness on
  509. # the worker-dispatcher
  510. batch-accept-limit = 10
  511.  
  512. # The number of bytes per direct buffer in the pool used to read or write
  513. # network data from the kernel.
  514. direct-buffer-size = 128 KiB
  515.  
  516. # The maximal number of direct buffers kept in the direct buffer pool for
  517. # reuse.
  518. direct-buffer-pool-limit = 1000
  519.  
  520. # The duration a connection actor waits for a `Register` message from
  521. # its commander before aborting the connection.
  522. register-timeout = 5s
  523.  
  524. # The maximum number of bytes delivered by a `Received` message. Before
  525. # more data is read from the network the connection actor will try to
  526. # do other work.
  527. max-received-message-size = unlimited
  528.  
  529. # Enable fine grained logging of what goes on inside the implementation.
  530. # Be aware that this may log more than once per message sent to the actors
  531. # of the tcp implementation.
  532. trace-logging = off
  533.  
  534. # Fully qualified config path which holds the dispatcher configuration
  535. # to be used for running the select() calls in the selectors
  536. selector-dispatcher = "akka.io.pinned-dispatcher"
  537.  
  538. # Fully qualified config path which holds the dispatcher configuration
  539. # for the read/write worker actors
  540. worker-dispatcher = "akka.actor.default-dispatcher"
  541.  
  542. # Fully qualified config path which holds the dispatcher configuration
  543. # for the selector management actors
  544. management-dispatcher = "akka.actor.default-dispatcher"
  545.  
  546. # Fully qualified config path which holds the dispatcher configuration
  547. # on which file IO tasks are scheduled
  548. file-io-dispatcher = "akka.actor.default-dispatcher"
  549.  
  550. # The maximum number of bytes (or "unlimited") to transfer in one batch
  551. # when using `WriteFile` command which uses `FileChannel.transferTo` to
  552. # pipe files to a TCP socket. On some OS like Linux `FileChannel.transferTo`
  553. # may block for a long time when network IO is faster than file IO.
  554. # Decreasing the value may improve fairness while increasing may improve
  555. # throughput.
  556. file-io-transferTo-limit = 512 KiB
  557.  
  558. # The number of times to retry the `finishConnect` call after being notified about
  559. # OP_CONNECT. Retries are needed if the OP_CONNECT notification doesn't imply that
  560. # `finishConnect` will succeed, which is the case on Android.
  561. finish-connect-retries = 5
  562. }
  563.  
  564. udp {
  565.  
  566. # The number of selectors to stripe the served channels over; each of
  567. # these will use one select loop on the selector-dispatcher.
  568. nr-of-selectors = 1
  569.  
  570. # Maximum number of open channels supported by this UDP module Generally
  571. # UDP does not require a large number of channels, therefore it is
  572. # recommended to keep this setting low.
  573. max-channels = 4096
  574.  
  575. # The select loop can be used in two modes:
  576. # - setting "infinite" will select without a timeout, hogging a thread
  577. # - setting a positive timeout will do a bounded select call,
  578. # enabling sharing of a single thread between multiple selectors
  579. # (in this case you will have to use a different configuration for the
  580. # selector-dispatcher, e.g. using "type=Dispatcher" with size 1)
  581. # - setting it to zero means polling, i.e. calling selectNow()
  582. select-timeout = infinite
  583.  
  584. # When trying to assign a new connection to a selector and the chosen
  585. # selector is at full capacity, retry selector choosing and assignment
  586. # this many times before giving up
  587. selector-association-retries = 10
  588.  
  589. # The maximum number of datagrams that are read in one go,
  590. # higher numbers decrease latency, lower numbers increase fairness on
  591. # the worker-dispatcher
  592. receive-throughput = 3
  593.  
  594. # The number of bytes per direct buffer in the pool used to read or write
  595. # network data from the kernel.
  596. direct-buffer-size = 128 KiB
  597.  
  598. # The maximal number of direct buffers kept in the direct buffer pool for
  599. # reuse.
  600. direct-buffer-pool-limit = 1000
  601.  
  602. # The maximum number of bytes delivered by a `Received` message. Before
  603. # more data is read from the network the connection actor will try to
  604. # do other work.
  605. received-message-size-limit = unlimited
  606.  
  607. # Enable fine grained logging of what goes on inside the implementation.
  608. # Be aware that this may log more than once per message sent to the actors
  609. # of the tcp implementation.
  610. trace-logging = off
  611.  
  612. # Fully qualified config path which holds the dispatcher configuration
  613. # to be used for running the select() calls in the selectors
  614. selector-dispatcher = "akka.io.pinned-dispatcher"
  615.  
  616. # Fully qualified config path which holds the dispatcher configuration
  617. # for the read/write worker actors
  618. worker-dispatcher = "akka.actor.default-dispatcher"
  619.  
  620. # Fully qualified config path which holds the dispatcher configuration
  621. # for the selector management actors
  622. management-dispatcher = "akka.actor.default-dispatcher"
  623. }
  624.  
  625. udp-connected {
  626.  
  627. # The number of selectors to stripe the served channels over; each of
  628. # these will use one select loop on the selector-dispatcher.
  629. nr-of-selectors = 1
  630.  
  631. # Maximum number of open channels supported by this UDP module Generally
  632. # UDP does not require a large number of channels, therefore it is
  633. # recommended to keep this setting low.
  634. max-channels = 4096
  635.  
  636. # The select loop can be used in two modes:
  637. # - setting "infinite" will select without a timeout, hogging a thread
  638. # - setting a positive timeout will do a bounded select call,
  639. # enabling sharing of a single thread between multiple selectors
  640. # (in this case you will have to use a different configuration for the
  641. # selector-dispatcher, e.g. using "type=Dispatcher" with size 1)
  642. # - setting it to zero means polling, i.e. calling selectNow()
  643. select-timeout = infinite
  644.  
  645. # When trying to assign a new connection to a selector and the chosen
  646. # selector is at full capacity, retry selector choosing and assignment
  647. # this many times before giving up
  648. selector-association-retries = 10
  649.  
  650. # The maximum number of datagrams that are read in one go,
  651. # higher numbers decrease latency, lower numbers increase fairness on
  652. # the worker-dispatcher
  653. receive-throughput = 3
  654.  
  655. # The number of bytes per direct buffer in the pool used to read or write
  656. # network data from the kernel.
  657. direct-buffer-size = 128 KiB
  658.  
  659. # The maximal number of direct buffers kept in the direct buffer pool for
  660. # reuse.
  661. direct-buffer-pool-limit = 1000
  662.  
  663. # The maximum number of bytes delivered by a `Received` message. Before
  664. # more data is read from the network the connection actor will try to
  665. # do other work.
  666. received-message-size-limit = unlimited
  667.  
  668. # Enable fine grained logging of what goes on inside the implementation.
  669. # Be aware that this may log more than once per message sent to the actors
  670. # of the tcp implementation.
  671. trace-logging = off
  672.  
  673. # Fully qualified config path which holds the dispatcher configuration
  674. # to be used for running the select() calls in the selectors
  675. selector-dispatcher = "akka.io.pinned-dispatcher"
  676.  
  677. # Fully qualified config path which holds the dispatcher configuration
  678. # for the read/write worker actors
  679. worker-dispatcher = "akka.actor.default-dispatcher"
  680.  
  681. # Fully qualified config path which holds the dispatcher configuration
  682. # for the selector management actors
  683. management-dispatcher = "akka.actor.default-dispatcher"
  684. }
  685.  
  686.  
  687. # IMPORTANT NOTICE:
  688. #
  689. # The following settings belong to the deprecated akka.actor.IO
  690. # implementation and will be removed once that is removed. They are not
  691. # taken into account by the akka.io.* implementation, which is configured
  692. # above!
  693.  
  694. # In bytes, the size of the shared read buffer. In the span 0b..2GiB.
  695. #
  696. read-buffer-size = 8KiB
  697.  
  698. # Specifies how many ops are done between every descriptor selection
  699. select-interval = 100
  700.  
  701. # Number of connections that are allowed in the backlog.
  702. # 0 or negative means that the platform default will be used.
  703. default-backlog = 1000
  704. }
  705.  
  706.  
  707. }

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. akka {
  12.  
  13. actor {
  14.  
  15. serializers {
  16. akka-containers = "akka.remote.serialization.MessageContainerSerializer"
  17. proto = "akka.remote.serialization.ProtobufSerializer"
  18. daemon-create = "akka.remote.serialization.DaemonMsgCreateSerializer"
  19. }
  20.  
  21.  
  22. serialization-bindings {
  23. # Since com.google.protobuf.Message does not extend Serializable but
  24. # GeneratedMessage does, need to use the more specific one here in order
  25. # to avoid ambiguity
  26. "akka.actor.SelectionPath" = akka-containers
  27. "com.google.protobuf.GeneratedMessage" = proto
  28. "akka.remote.DaemonMsgCreate" = daemon-create
  29. }
  30.  
  31. deployment {
  32.  
  33. default {
  34.  
  35. # if this is set to a valid remote address, the named actor will be
  36. # deployed at that node e.g. "akka://sys@host:port"
  37. remote = ""
  38.  
  39. target {
  40.  
  41. # A list of hostnames and ports for instantiating the children of a
  42. # router
  43. # The format should be on "akka://sys@host:port", where:
  44. # - sys is the remote actor system name
  45. # - hostname can be either hostname or IP address the remote actor
  46. # should connect to
  47. # - port should be the port for the remote server on the other node
  48. # The number of actor instances to be spawned is still taken from the
  49. # nr-of-instances setting as for local routers; the instances will be
  50. # distributed round-robin among the given nodes.
  51. nodes = []
  52.  
  53. }
  54. }
  55. }
  56. }
  57.  
  58. remote {
  59.  
  60. ### General settings
  61.  
  62. # Timeout after which the startup of the remoting subsystem is considered
  63. # to be failed. Increase this value if your transport drivers (see the
  64. # enabled-transports section) need longer time to be loaded.
  65. startup-timeout = 10 s
  66.  
  67. # Timout after which the graceful shutdown of the remoting subsystem is
  68. # considered to be failed. After the timeout the remoting system is
  69. # forcefully shut down. Increase this value if your transport drivers
  70. # (see the enabled-transports section) need longer time to stop properly.
  71. shutdown-timeout = 10 s
  72.  
  73. # Before shutting down the drivers, the remoting subsystem attempts to flush
  74. # all pending writes. This setting controls the maximum time the remoting is
  75. # willing to wait before moving on to shut down the drivers.
  76. flush-wait-on-shutdown = 2 s
  77.  
  78. # Reuse inbound connections for outbound messages
  79. use-passive-connections = on
  80.  
  81. # Controls the backoff interval after a refused write is reattempted.
  82. # (Transports may refuse writes if their internal buffer is full)
  83. backoff-interval = 0.01 s
  84.  
  85. # Acknowledgment timeout of management commands sent to the transport stack.
  86. command-ack-timeout = 30 s
  87.  
  88. # If set to a nonempty string remoting will use the given dispatcher for
  89. # its internal actors otherwise the default dispatcher is used. Please note
  90. # that since remoting can load arbitrary 3rd party drivers (see
  91. # "enabled-transport" and "adapters" entries) it is not guaranteed that
  92. # every module will respect this setting.
  93. use-dispatcher = ""
  94.  
  95. ### Security settings
  96.  
  97. # Enable untrusted mode for full security of server managed actors, prevents
  98. # system messages to be send by clients, e.g. messages like 'Create',
  99. # 'Suspend', 'Resume', 'Terminate', 'Supervise', 'Link' etc.
  100. untrusted-mode = off
  101.  
  102. # Should the remote server require that its peers share the same
  103. # secure-cookie (defined in the 'remote' section)? Secure cookies are passed
  104. # between during the initial handshake. Connections are refused if the initial
  105. # message contains a mismatching cookie or the cookie is missing.
  106. require-cookie = off
  107.  
  108. # Generate your own with the script availbale in
  109. # '$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh' or using
  110. # 'akka.util.Crypt.generateSecureCookie'
  111. secure-cookie = ""
  112.  
  113. ### Logging
  114.  
  115. # If this is "on", Akka will log all inbound messages at DEBUG level,
  116. # if off then they are not logged
  117. log-received-messages = off
  118.  
  119. # If this is "on", Akka will log all outbound messages at DEBUG level,
  120. # if off then they are not logged
  121. log-sent-messages = off
  122.  
  123. # Sets the log granularity level at which Akka logs remoting events. This setting
  124. # can take the values OFF, ERROR, WARNING, INFO, DEBUG, or ON. For compatibility
  125. # reasons the setting "on" will default to "debug" level. Please note that the effective
  126. # logging level is still determined by the global logging level of the actor system:
  127. # for example debug level remoting events will be only logged if the system
  128. # is running with debug level logging.
  129. # Failures to deserialize received messages also fall under this flag.
  130. log-remote-lifecycle-events = on
  131.  
  132. # Logging of message types with payload size in bytes larger than
  133. # this value. Maximum detected size per message type is logged once,
  134. # with an increase threshold of 10%.
  135. # By default this feature is turned off. Activate it by setting the property to
  136. # a value in bytes, such as 1000b. Note that for all messages larger than this
  137. # limit there will be extra performance and scalability cost.
  138. log-frame-size-exceeding = off
  139.  
  140. ### Failure detection and recovery
  141.  
  142. # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf
  143. # [Hayashibara et al]) used by the remoting subsystem to detect failed
  144. # connections.
  145. transport-failure-detector {
  146.  
  147. # FQCN of the failure detector implementation.
  148. # It must implement akka.remote.FailureDetector and have
  149. # a public constructor with a com.typesafe.config.Config and
  150. # akka.actor.EventStream parameter.
  151. implementation-class = "akka.remote.PhiAccrualFailureDetector"
  152.  
  153. # How often keep-alive heartbeat messages should be sent to each connection.
  154. heartbeat-interval = 1 s
  155.  
  156. # Defines the failure detector threshold.
  157. # A low threshold is prone to generate many wrong suspicions but ensures
  158. # a quick detection in the event of a real crash. Conversely, a high
  159. # threshold generates fewer mistakes but needs more time to detect
  160. # actual crashes.
  161. threshold = 7.0
  162.  
  163. # Number of the samples of inter-heartbeat arrival times to adaptively
  164. # calculate the failure timeout for connections.
  165. max-sample-size = 100
  166.  
  167. # Minimum standard deviation to use for the normal distribution in
  168. # AccrualFailureDetector. Too low standard deviation might result in
  169. # too much sensitivity for sudden, but normal, deviations in heartbeat
  170. # inter arrival times.
  171. min-std-deviation = 100 ms
  172.  
  173. # Number of potentially lost/delayed heartbeats that will be
  174. # accepted before considering it to be an anomaly.
  175. # This margin is important to be able to survive sudden, occasional,
  176. # pauses in heartbeat arrivals, due to for example garbage collect or
  177. # network drop.
  178. acceptable-heartbeat-pause = 3 s
  179. }
  180.  
  181. # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf
  182. # [Hayashibara et al]) used for remote death watch.
  183. watch-failure-detector {
  184.  
  185. # FQCN of the failure detector implementation.
  186. # It must implement akka.remote.FailureDetector and have
  187. # a public constructor with a com.typesafe.config.Config and
  188. # akka.actor.EventStream parameter.
  189. implementation-class = "akka.remote.PhiAccrualFailureDetector"
  190.  
  191. # How often keep-alive heartbeat messages should be sent to each connection.
  192. heartbeat-interval = 1 s
  193.  
  194. # Defines the failure detector threshold.
  195. # A low threshold is prone to generate many wrong suspicions but ensures
  196. # a quick detection in the event of a real crash. Conversely, a high
  197. # threshold generates fewer mistakes but needs more time to detect
  198. # actual crashes.
  199. threshold = 10.0
  200.  
  201. # Number of the samples of inter-heartbeat arrival times to adaptively
  202. # calculate the failure timeout for connections.
  203. max-sample-size = 200
  204.  
  205. # Minimum standard deviation to use for the normal distribution in
  206. # AccrualFailureDetector. Too low standard deviation might result in
  207. # too much sensitivity for sudden, but normal, deviations in heartbeat
  208. # inter arrival times.
  209. min-std-deviation = 100 ms
  210.  
  211. # Number of potentially lost/delayed heartbeats that will be
  212. # accepted before considering it to be an anomaly.
  213. # This margin is important to be able to survive sudden, occasional,
  214. # pauses in heartbeat arrivals, due to for example garbage collect or
  215. # network drop.
  216. acceptable-heartbeat-pause = 4 s
  217.  
  218.  
  219. # How often to check for nodes marked as unreachable by the failure
  220. # detector
  221. unreachable-nodes-reaper-interval = 1s
  222.  
  223. # After the heartbeat request has been sent the first failure detection
  224. # will start after this period, even though no heartbeat mesage has
  225. # been received.
  226. expected-response-after = 3 s
  227.  
  228. }
  229.  
  230. # After failed to establish an outbound connection, the remoting will mark the
  231. # address as failed. This configuration option controls how much time should
  232. # be elapsed before reattempting a new connection. While the address is
  233. # gated, all messages sent to the address are delivered to dead-letters.
  234. # If this setting is 0, the remoting will always immediately reattempt
  235. # to establish a failed outbound connection and will buffer writes until
  236. # it succeeds.
  237. retry-gate-closed-for = 0 s
  238.  
  239. # If the retry gate function is disabled (see retry-gate-closed-for) the
  240. # remoting subsystem will always attempt to reestablish failed outbound
  241. # connections. The settings below together control the maximum number of
  242. # reattempts in a given time window. The number of reattempts during
  243. # a window of "retry-window" will be maximum "maximum-retries-in-window".
  244. retry-window = 60 s
  245. maximum-retries-in-window = 3
  246.  
  247. # The length of time to gate an address whose name lookup has failed
  248. # or has explicitly signalled that it will not accept connections
  249. # (remote system is shutting down or the requesting system is quarantined).
  250. # No connection attempts will be made to an address while it remains
  251. # gated. Any messages sent to a gated address will be directed to dead
  252. # letters instead. Name lookups are costly, and the time to recovery
  253. # is typically large, therefore this setting should be a value in the
  254. # order of seconds or minutes.
  255. gate-invalid-addresses-for = 60 s
  256.  
  257. # This settings controls how long a system will be quarantined after
  258. # catastrophic communication failures that result in the loss of system
  259. # messages. Quarantining prevents communication with the remote system
  260. # of a given UID. This function can be disabled by setting the value
  261. # to "off".
  262. quarantine-systems-for = 60s
  263.  
  264. # This setting defines the maximum number of unacknowledged system messages
  265. # allowed for a remote system. If this limit is reached the remote system is
  266. # declared to be dead and its UID marked as tainted.
  267. system-message-buffer-size = 1000
  268.  
  269. # This setting defines the maximum idle time after an individual
  270. # acknowledgement for system messages is sent. System message delivery
  271. # is guaranteed by explicit acknowledgement messages. These acks are
  272. # piggybacked on ordinary traffic messages. If no traffic is detected
  273. # during the time period configured here, the remoting will send out
  274. # an individual ack.
  275. system-message-ack-piggyback-timeout = 1 s
  276.  
  277. # This setting defines the time after messages that have not been
  278. # explicitly acknowledged or negatively acknowledged are resent.
  279. # Messages that were negatively acknowledged are always immediately
  280. # resent.
  281. resend-interval = 1 s
  282.  
  283. ### Transports and adapters
  284.  
  285. # List of the transport drivers that will be loaded by the remoting.
  286. # A list of fully qualified config paths must be provided where
  287. # the given configuration path contains a transport-class key
  288. # pointing to an implementation class of the Transport interface.
  289. # If multiple transports are provided, the address of the first
  290. # one will be used as a default address.
  291. enabled-transports = ["akka.remote.netty.tcp"]
  292.  
  293. # Transport drivers can be augmented with adapters by adding their
  294. # name to the applied-adapters setting in the configuration of a
  295. # transport. The available adapters should be configured in this
  296. # section by providing a name, and the fully qualified name of
  297. # their corresponding implementation. The class given here
  298. # must implement akka.akka.remote.transport.TransportAdapterProvider
  299. # and have public constructor without parameters.
  300. adapters {
  301. gremlin = "akka.remote.transport.FailureInjectorProvider"
  302. trttl = "akka.remote.transport.ThrottlerProvider"
  303. }
  304.  
  305. ### Default configuration for the Netty based transport drivers
  306.  
  307. netty.tcp {
  308. # The class given here must implement the akka.remote.transport.Transport
  309. # interface and offer a public constructor which takes two arguments:
  310. # 1) akka.actor.ExtendedActorSystem
  311. # 2) com.typesafe.config.Config
  312. transport-class = "akka.remote.transport.netty.NettyTransport"
  313.  
  314. # Transport drivers can be augmented with adapters by adding their
  315. # name to the applied-adapters list. The last adapter in the
  316. # list is the adapter immediately above the driver, while
  317. # the first one is the top of the stack below the standard
  318. # Akka protocol
  319. applied-adapters = []
  320.  
  321. transport-protocol = tcp
  322.  
  323. # The default remote server port clients should connect to.
  324. # Default is 2552 (AKKA), use 0 if you want a random available port
  325. # This port needs to be unique for each actor system on the same machine.
  326. port = 2552
  327.  
  328. # The hostname or ip to bind the remoting to,
  329. # InetAddress.getLocalHost.getHostAddress is used if empty
  330. hostname = ""
  331.  
  332. # Enables SSL support on this transport
  333. enable-ssl = false
  334.  
  335. # Sets the connectTimeoutMillis of all outbound connections,
  336. # i.e. how long a connect may take until it is timed out
  337. connection-timeout = 15 s
  338.  
  339. # If set to "<id.of.dispatcher>" then the specified dispatcher
  340. # will be used to accept inbound connections, and perform IO. If "" then
  341. # dedicated threads will be used.
  342. # Please note that the Netty driver only uses this configuration and does
  343. # not read the "akka.remote.use-dispatcher" entry. Instead it has to be
  344. # configured manually to point to the same dispatcher if needed.
  345. use-dispatcher-for-io = ""
  346.  
  347. # Sets the high water mark for the in and outbound sockets,
  348. # set to 0b for platform default
  349. write-buffer-high-water-mark = 0b
  350.  
  351. # Sets the low water mark for the in and outbound sockets,
  352. # set to 0b for platform default
  353. write-buffer-low-water-mark = 0b
  354.  
  355. # Sets the send buffer size of the Sockets,
  356. # set to 0b for platform default
  357. send-buffer-size = 256000b
  358.  
  359. # Sets the receive buffer size of the Sockets,
  360. # set to 0b for platform default
  361. receive-buffer-size = 256000b
  362.  
  363. # Maximum message size the transport will accept, but at least
  364. # 32000 bytes.
  365. # Please note that UDP does not support arbitrary large datagrams,
  366. # so this setting has to be chosen carefully when using UDP.
  367. # Both send-buffer-size and receive-buffer-size settings has to
  368. # be adjusted to be able to buffer messages of maximum size.
  369. maximum-frame-size = 128000b
  370.  
  371. # Sets the size of the connection backlog
  372. backlog = 4096
  373.  
  374. # Enables the TCP_NODELAY flag, i.e. disables Nagle’s algorithm
  375. tcp-nodelay = on
  376.  
  377. # Enables TCP Keepalive, subject to the O/S kernel’s configuration
  378. tcp-keepalive = on
  379.  
  380. # Enables SO_REUSEADDR, which determines when an ActorSystem can open
  381. # the specified listen port (the meaning differs between *nix and Windows)
  382. # Valid values are "on", "off" and "off-for-windows"
  383. # due to the following Windows bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4476378
  384. # "off-for-windows" of course means that it's "on" for all other platforms
  385. tcp-reuse-addr = off-for-windows
  386.  
  387. # Used to configure the number of I/O worker threads on server sockets
  388. server-socket-worker-pool {
  389. # Min number of threads to cap factor-based number to
  390. pool-size-min = 2
  391.  
  392. # The pool size factor is used to determine thread pool size
  393. # using the following formula: ceil(available processors * factor).
  394. # Resulting size is then bounded by the pool-size-min and
  395. # pool-size-max values.
  396. pool-size-factor = 1.0
  397.  
  398. # Max number of threads to cap factor-based number to
  399. pool-size-max = 2
  400. }
  401.  
  402. # Used to configure the number of I/O worker threads on client sockets
  403. client-socket-worker-pool {
  404. # Min number of threads to cap factor-based number to
  405. pool-size-min = 2
  406.  
  407. # The pool size factor is used to determine thread pool size
  408. # using the following formula: ceil(available processors * factor).
  409. # Resulting size is then bounded by the pool-size-min and
  410. # pool-size-max values.
  411. pool-size-factor = 1.0
  412.  
  413. # Max number of threads to cap factor-based number to
  414. pool-size-max = 2
  415. }
  416.  
  417.  
  418. }
  419.  
  420. netty.udp = ${akka.remote.netty.tcp}
  421. netty.udp {
  422. transport-protocol = udp
  423. }
  424.  
  425. netty.ssl = ${akka.remote.netty.tcp}
  426. netty.ssl = {
  427. # Enable SSL/TLS encryption.
  428. # This must be enabled on both the client and server to work.
  429. enable-ssl = true
  430.  
  431. security {
  432. # This is the Java Key Store used by the server connection
  433. key-store = "keystore"
  434.  
  435. # This password is used for decrypting the key store
  436. key-store-password = "changeme"
  437.  
  438. # This password is used for decrypting the key
  439. key-password = "changeme"
  440.  
  441. # This is the Java Key Store used by the client connection
  442. trust-store = "truststore"
  443.  
  444. # This password is used for decrypting the trust store
  445. trust-store-password = "changeme"
  446.  
  447. # Protocol to use for SSL encryption, choose from:
  448. # Java 6 & 7:
  449. # 'SSLv3', 'TLSv1'
  450. # Java 7:
  451. # 'TLSv1.1', 'TLSv1.2'
  452. protocol = "TLSv1"
  453.  
  454. # Example: ["TLS_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_CBC_SHA"]
  455. # You need to install the JCE Unlimited Strength Jurisdiction Policy
  456. # Files to use AES 256.
  457. # More info here:
  458. # http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#SunJCEProvider
  459. enabled-algorithms = ["TLS_RSA_WITH_AES_128_CBC_SHA"]
  460.  
  461. # There are three options, in increasing order of security:
  462. # "" or SecureRandom => (default)
  463. # "SHA1PRNG" => Can be slow because of blocking issues on Linux
  464. # "AES128CounterSecureRNG" => fastest startup and based on AES encryption
  465. # algorithm
  466. # "AES256CounterSecureRNG"
  467. # The following use one of 3 possible seed sources, depending on
  468. # availability: /dev/random, random.org and SecureRandom (provided by Java)
  469. # "AES128CounterInetRNG"
  470. # "AES256CounterInetRNG" (Install JCE Unlimited Strength Jurisdiction
  471. # Policy Files first)
  472. # Setting a value here may require you to supply the appropriate cipher
  473. # suite (see enabled-algorithms section above)
  474. random-number-generator = ""
  475. }
  476. }
  477.  
  478. ### Default configuration for the failure injector transport adapter
  479.  
  480. gremlin {
  481. # Enable debug logging of the failure injector transport adapter
  482. debug = off
  483. }
  484.  
  485. }
  486.  
  487. }

akka-testkit

  1. ######################################
  2. # Akka Testkit 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. akka {
  9. test {
  10. # factor by which to scale timeouts during tests, e.g. to account for shared
  11. # build system load
  12. timefactor = 1.0
  13.  
  14. # duration of EventFilter.intercept waits after the block is finished until
  15. # all required messages are received
  16. filter-leeway = 3s
  17.  
  18. # duration to wait in expectMsg and friends outside of within() block
  19. # by default
  20. single-expect-default = 3s
  21.  
  22. # The timeout that is added as an implicit by DefaultTimeout trait
  23. default-timeout = 5s
  24.  
  25. calling-thread-dispatcher {
  26. type = akka.testkit.CallingThreadDispatcherConfigurator
  27. }
  28. }
  29. }

akka-camel

  1. ####################################
  2. # Akka Camel 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. akka {
  9. camel {
  10. # Whether JMX should be enabled or disabled for the Camel Context
  11. jmx = off
  12. # enable/disable streaming cache on the Camel Context
  13. streamingCache = on
  14. consumer {
  15. # Configured setting which determines whether one-way communications
  16. # between an endpoint and this consumer actor
  17. # should be auto-acknowledged or application-acknowledged.
  18. # This flag has only effect when exchange is in-only.
  19. auto-ack = on
  20.  
  21. # When endpoint is out-capable (can produce responses) reply-timeout is the
  22. # maximum time the endpoint can take to send the response before the message
  23. # exchange fails. This setting is used for out-capable, in-only,
  24. # manually acknowledged communication.
  25. reply-timeout = 1m
  26.  
  27. # The duration of time to await activation of an endpoint.
  28. activation-timeout = 10s
  29. }
  30.  
  31. #Scheme to FQCN mappings for CamelMessage body conversions
  32. conversions {
  33. "file" = "java.io.InputStream"
  34. }
  35. }
  36. }

akka-cluster

  1. ######################################
  2. # Akka Cluster 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. akka {
  9.  
  10. cluster {
  11. # Initial contact points of the cluster.
  12. # The nodes to join automatically at startup.
  13. # Comma separated full URIs defined by a string on the form of
  14. # "akka://system@hostname:port"
  15. # Leave as empty if the node is supposed to be joined manually.
  16. seed-nodes = []
  17.  
  18. # how long to wait for one of the seed nodes to reply to initial join request
  19. seed-node-timeout = 5s
  20.  
  21. # If a join request fails it will be retried after this period.
  22. # Disable join retry by specifying "off".
  23. retry-unsuccessful-join-after = 10s
  24.  
  25. # Should the 'leader' in the cluster be allowed to automatically mark
  26. # unreachable nodes as DOWN?
  27. # Using auto-down implies that two separate clusters will automatically be
  28. # formed in case of network partition.
  29. auto-down = off
  30.  
  31. # The roles of this member. List of strings, e.g. roles = ["A", "B"].
  32. # The roles are part of the membership information and can be used by
  33. # routers or other services to distribute work to certain member types,
  34. # e.g. front-end and back-end nodes.
  35. roles = []
  36.  
  37. role {
  38. # Minimum required number of members of a certain role before the leader
  39. # changes member status of 'Joining' members to 'Up'. Typically used together
  40. # with 'Cluster.registerOnMemberUp' to defer some action, such as starting
  41. # actors, until the cluster has reached a certain size.
  42. # E.g. to require 2 nodes with role 'frontend' and 3 nodes with role 'backend':
  43. # frontend.min-nr-of-members = 2
  44. # backend.min-nr-of-members = 3
  45. #<role-name>.min-nr-of-members = 1
  46. }
  47.  
  48. # Minimum required number of members before the leader changes member status
  49. # of 'Joining' members to 'Up'. Typically used together with
  50. # 'Cluster.registerOnMemberUp' to defer some action, such as starting actors,
  51. # until the cluster has reached a certain size.
  52. min-nr-of-members = 1
  53.  
  54. # Enable/disable info level logging of cluster events
  55. log-info = on
  56.  
  57. # Enable or disable JMX MBeans for management of the cluster
  58. jmx.enabled = on
  59.  
  60. # how long should the node wait before starting the periodic tasks
  61. # maintenance tasks?
  62. periodic-tasks-initial-delay = 1s
  63.  
  64. # how often should the node send out gossip information?
  65. gossip-interval = 1s
  66.  
  67. # how often should the leader perform maintenance tasks?
  68. leader-actions-interval = 1s
  69.  
  70. # how often should the node move nodes, marked as unreachable by the failure
  71. # detector, out of the membership ring?
  72. unreachable-nodes-reaper-interval = 1s
  73.  
  74. # How often the current internal stats should be published.
  75. # A value of 0s can be used to always publish the stats, when it happens.
  76. # Disable with "off".
  77. publish-stats-interval = off
  78.  
  79. # The id of the dispatcher to use for cluster actors. If not specified
  80. # default dispatcher is used.
  81. # If specified you need to define the settings of the actual dispatcher.
  82. use-dispatcher = ""
  83.  
  84. # Gossip to random node with newer or older state information, if any with
  85. # this probability. Otherwise Gossip to any random live node.
  86. # Probability value is between 0.0 and 1.0. 0.0 means never, 1.0 means always.
  87. gossip-different-view-probability = 0.8
  88.  
  89. # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf
  90. # [Hayashibara et al]) used by the cluster subsystem to detect unreachable
  91. # members.
  92. failure-detector {
  93.  
  94. # FQCN of the failure detector implementation.
  95. # It must implement akka.remote.FailureDetector and have
  96. # a public constructor with a com.typesafe.config.Config and
  97. # akka.actor.EventStream parameter.
  98. implementation-class = "akka.remote.PhiAccrualFailureDetector"
  99.  
  100. # How often keep-alive heartbeat messages should be sent to each connection.
  101. heartbeat-interval = 1 s
  102.  
  103. # Defines the failure detector threshold.
  104. # A low threshold is prone to generate many wrong suspicions but ensures
  105. # a quick detection in the event of a real crash. Conversely, a high
  106. # threshold generates fewer mistakes but needs more time to detect
  107. # actual crashes.
  108. threshold = 8.0
  109.  
  110. # Number of the samples of inter-heartbeat arrival times to adaptively
  111. # calculate the failure timeout for connections.
  112. max-sample-size = 1000
  113.  
  114. # Minimum standard deviation to use for the normal distribution in
  115. # AccrualFailureDetector. Too low standard deviation might result in
  116. # too much sensitivity for sudden, but normal, deviations in heartbeat
  117. # inter arrival times.
  118. min-std-deviation = 100 ms
  119.  
  120. # Number of potentially lost/delayed heartbeats that will be
  121. # accepted before considering it to be an anomaly.
  122. # This margin is important to be able to survive sudden, occasional,
  123. # pauses in heartbeat arrivals, due to for example garbage collect or
  124. # network drop.
  125. acceptable-heartbeat-pause = 3 s
  126.  
  127. # Number of member nodes that each member will send heartbeat messages to,
  128. # i.e. each node will be monitored by this number of other nodes.
  129. monitored-by-nr-of-members = 5
  130.  
  131. # When a node stops sending heartbeats to another node it will end that
  132. # with this number of EndHeartbeat messages, which will remove the
  133. # monitoring from the failure detector.
  134. nr-of-end-heartbeats = 8
  135.  
  136. # When no expected heartbeat message has been received an explicit
  137. # heartbeat request is sent to the node that should emit heartbeats.
  138. heartbeat-request {
  139. # Grace period until an explicit heartbeat request is sent
  140. grace-period = 10 s
  141.  
  142. # After the heartbeat request has been sent the first failure detection
  143. # will start after this period, even though no heartbeat mesage has
  144. # been received.
  145. expected-response-after = 3 s
  146.  
  147. # Cleanup of obsolete heartbeat requests
  148. time-to-live = 60 s
  149. }
  150. }
  151.  
  152. metrics {
  153. # Enable or disable metrics collector for load-balancing nodes.
  154. enabled = on
  155.  
  156. # FQCN of the metrics collector implementation.
  157. # It must implement akka.cluster.MetricsCollector and
  158. # have public constructor with akka.actor.ActorSystem parameter.
  159. # The default SigarMetricsCollector uses JMX and Hyperic SIGAR, if SIGAR
  160. # is on the classpath, otherwise only JMX.
  161. collector-class = "akka.cluster.SigarMetricsCollector"
  162.  
  163. # How often metrics are sampled on a node.
  164. # Shorter interval will collect the metrics more often.
  165. collect-interval = 3s
  166.  
  167. # How often a node publishes metrics information.
  168. gossip-interval = 3s
  169.  
  170. # How quickly the exponential weighting of past data is decayed compared to
  171. # new data. Set lower to increase the bias toward newer values.
  172. # The relevance of each data sample is halved for every passing half-life
  173. # duration, i.e. after 4 times the half-life, a data sample’s relevance is
  174. # reduced to 6% of its original relevance. The initial relevance of a data
  175. # sample is given by 1 – 0.5 ^ (collect-interval / half-life).
  176. # See http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average
  177. moving-average-half-life = 12s
  178. }
  179.  
  180. # If the tick-duration of the default scheduler is longer than the
  181. # tick-duration configured here a dedicated scheduler will be used for
  182. # periodic tasks of the cluster, otherwise the default scheduler is used.
  183. # See akka.scheduler settings for more details.
  184. scheduler {
  185. tick-duration = 33ms
  186. ticks-per-wheel = 512
  187. }
  188.  
  189. }
  190.  
  191. # Default configuration for routers
  192. actor.deployment.default {
  193. # MetricsSelector to use
  194. # - available: "mix", "heap", "cpu", "load"
  195. # - or: Fully qualified class name of the MetricsSelector class.
  196. # The class must extend akka.cluster.routing.MetricsSelector
  197. # and have a public constructor with com.typesafe.config.Config
  198. # parameter.
  199. # - default is "mix"
  200. metrics-selector = mix
  201. }
  202. actor.deployment.default.cluster {
  203. # enable cluster aware router that deploys to nodes in the cluster
  204. enabled = off
  205.  
  206. # Maximum number of routees that will be deployed on each cluster
  207. # member node.
  208. # Note that nr-of-instances defines total number of routees, but
  209. # number of routees per node will not be exceeded, i.e. if you
  210. # define nr-of-instances = 50 and max-nr-of-instances-per-node = 2
  211. # it will deploy 2 routees per new member in the cluster, up to
  212. # 25 members.
  213. max-nr-of-instances-per-node = 1
  214.  
  215. # Defines if routees are allowed to be located on the same node as
  216. # the head router actor, or only on remote nodes.
  217. # Useful for master-worker scenario where all routees are remote.
  218. allow-local-routees = on
  219.  
  220. # Actor path of the routees to lookup with actorFor on the member
  221. # nodes in the cluster. E.g. "/user/myservice". If this isn't defined
  222. # the routees will be deployed instead of looked up.
  223. # max-nr-of-instances-per-node should not be configured (default value is 1)
  224. # when routees-path is defined.
  225. routees-path = ""
  226.  
  227. # Use members with specified role, or all members if undefined or empty.
  228. use-role = ""
  229.  
  230. }
  231.  
  232. # Protobuf serializer for cluster messages
  233. actor {
  234. serializers {
  235. akka-cluster = "akka.cluster.protobuf.ClusterMessageSerializer"
  236. }
  237.  
  238. serialization-bindings {
  239. "akka.cluster.ClusterMessage" = akka-cluster
  240. }
  241. }
  242.  
  243. }

akka-transactor

  1. #########################################
  2. # Akka Transactor 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. akka {
  9. transactor {
  10. # The timeout used for coordinated transactions across actors
  11. coordinated-timeout = 5s
  12. }
  13. }

akka-agent

  1. ####################################
  2. # Akka Agent 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. akka {
  9. agent {
  10.  
  11. # The dispatcher used for agent-send-off actor
  12. send-off-dispatcher {
  13. executor = thread-pool-executor
  14. type = PinnedDispatcher
  15. }
  16.  
  17. # The dispatcher used for agent-alter-off actor
  18. alter-off-dispatcher {
  19. executor = thread-pool-executor
  20. type = PinnedDispatcher
  21. }
  22. }
  23. }

akka-zeromq

  1. #####################################
  2. # Akka ZeroMQ 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. akka {
  9.  
  10. zeromq {
  11.  
  12. # The default timeout for a poll on the actual zeromq socket.
  13. poll-timeout = 100ms
  14.  
  15. # Timeout for creating a new socket
  16. new-socket-timeout = 5s
  17.  
  18. socket-dispatcher {
  19. # A zeromq socket needs to be pinned to the thread that created it.
  20. # Changing this value results in weird errors and race conditions within
  21. # zeromq
  22. executor = thread-pool-executor
  23. type = "PinnedDispatcher"
  24. thread-pool-executor.allow-core-timeout = off
  25. }
  26. }
  27. }

akka-file-mailbox

  1. #############################################
  2. # Akka File Mailboxes 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. # For more information see <https://github.com/robey/kestrel/>
  9.  
  10. akka {
  11. actor {
  12. mailbox {
  13. file-based {
  14. # directory below which this queue resides
  15. directory-path = "./_mb"
  16.  
  17. # attempting to add an item after the queue reaches this size (in items)
  18. # will fail.
  19. max-items = 2147483647
  20.  
  21. # attempting to add an item after the queue reaches this size (in bytes)
  22. # will fail.
  23. max-size = 2147483647 bytes
  24.  
  25. # attempting to add an item larger than this size (in bytes) will fail.
  26. max-item-size = 2147483647 bytes
  27.  
  28. # maximum expiration time for this queue (seconds).
  29. max-age = 0s
  30.  
  31. # maximum journal size before the journal should be rotated.
  32. max-journal-size = 16 MiB
  33.  
  34. # maximum size of a queue before it drops into read-behind mode.
  35. max-memory-size = 128 MiB
  36.  
  37. # maximum overflow (multiplier) of a journal file before we re-create it.
  38. max-journal-overflow = 10
  39.  
  40. # absolute maximum size of a journal file until we rebuild it,
  41. # no matter what.
  42. max-journal-size-absolute = 9223372036854775807 bytes
  43.  
  44. # whether to drop older items (instead of newer) when the queue is full
  45. discard-old-when-full = on
  46.  
  47. # whether to keep a journal file at all
  48. keep-journal = on
  49.  
  50. # whether to sync the journal after each transaction
  51. sync-journal = off
  52.  
  53. # circuit breaker configuration
  54. circuit-breaker {
  55. # maximum number of failures before opening breaker
  56. max-failures = 3
  57.  
  58. # duration of time beyond which a call is assumed to be timed out and
  59. # considered a failure
  60. call-timeout = 3 seconds
  61.  
  62. # duration of time to wait until attempting to reset the breaker during
  63. # which all calls fail-fast
  64. reset-timeout = 30 seconds
  65. }
  66. }
  67. }
  68. }
  69. }