diff --git a/akka-actor-tests/src/test/resources/akka/serialization/serialized.conf b/akka-actor-tests/src/test/resources/akka/serialization/serialized.conf deleted file mode 100644 index a15458be5a..0000000000 --- a/akka-actor-tests/src/test/resources/akka/serialization/serialized.conf +++ /dev/null @@ -1,22 +0,0 @@ -# Serialized objects, used for testinging serialization compatibility across -# different versions of Akka. - -akka.dispatch.Create = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720014616b6b612e64697370617463682e437265617465bcdf9f7f2675038d0200014900037569647870000004d27671007e0003" - -akka.dispatch.Recreate = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720016616b6b612e64697370617463682e52656372656174650987c65c8d378a800200014c000563617573657400154c6a6176612f6c616e672f5468726f7761626c653b787073720020616b6b612e73657269616c697a6174696f6e2e46616b655468726f7761626c6500000000000000010200014c00036d73677400124c6a6176612f6c616e672f537472696e673b787200136a6176612e6c616e672e5468726f7761626c65d5c635273977b8cb0300044c0005636175736571007e00044c000d64657461696c4d65737361676571007e00075b000a737461636b547261636574001e5b4c6a6176612f6c616e672f537461636b5472616365456c656d656e743b4c001473757070726573736564457863657074696f6e737400104c6a6176612f7574696c2f4c6973743b787071007e000b740001787572001e5b4c6a6176612e6c616e672e537461636b5472616365456c656d656e743b02462a3c3cfd2239020000787000000000737200266a6176612e7574696c2e436f6c6c656374696f6e7324556e6d6f6469666961626c654c697374fc0f2531b5ec8e100200014c00046c69737471007e000a7872002c6a6176612e7574696c2e436f6c6c656374696f6e7324556e6d6f6469666961626c65436f6c6c656374696f6e19420080cb5ef71e0200014c0001637400164c6a6176612f7574696c2f436f6c6c656374696f6e3b7870737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a657870000000007704000000007871007e00147871007e000c7671007e0003" - -akka.dispatch.Suspend = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720015616b6b612e64697370617463682e53757370656e6464e531d5d134b59902000078707671007e0003" - -akka.dispatch.Resume = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720014616b6b612e64697370617463682e526573756d65dc5e646d445fcb010200014c000f63617573656442794661696c7572657400154c6a6176612f6c616e672f5468726f7761626c653b787073720020616b6b612e73657269616c697a6174696f6e2e46616b655468726f7761626c6500000000000000010200014c00036d73677400124c6a6176612f6c616e672f537472696e673b787200136a6176612e6c616e672e5468726f7761626c65d5c635273977b8cb0300044c0005636175736571007e00044c000d64657461696c4d65737361676571007e00075b000a737461636b547261636574001e5b4c6a6176612f6c616e672f537461636b5472616365456c656d656e743b4c001473757070726573736564457863657074696f6e737400104c6a6176612f7574696c2f4c6973743b787071007e000b740001787572001e5b4c6a6176612e6c616e672e537461636b5472616365456c656d656e743b02462a3c3cfd2239020000787000000000737200266a6176612e7574696c2e436f6c6c656374696f6e7324556e6d6f6469666961626c654c697374fc0f2531b5ec8e100200014c00046c69737471007e000a7872002c6a6176612e7574696c2e436f6c6c656374696f6e7324556e6d6f6469666961626c65436f6c6c656374696f6e19420080cb5ef71e0200014c0001637400164c6a6176612f7574696c2f436f6c6c656374696f6e3b7870737200136a6176612e7574696c2e41727261794c6973747881d21d99c7619d03000149000473697a657870000000007704000000007871007e00147871007e000c7671007e0003" - -akka.dispatch.Terminate = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720017616b6b612e64697370617463682e5465726d696e61746509d66ca68318700f02000078707671007e0003" - -akka.dispatch.Supervise = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720017616b6b612e64697370617463682e5375706572766973652d0b363f56ab5feb0200035a00056173796e634900037569644c00056368696c647400154c616b6b612f6163746f722f4163746f725265663b787001000009a47372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f469402000078707400056368696c647671007e0003" - -akka.dispatch.ChildTerminated = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e000178707372001d616b6b612e64697370617463682e4368696c645465726d696e617465644c84222437ed5db40200014c00056368696c647400154c616b6b612f6163746f722f4163746f725265663b78707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f469402000078707400056368696c647671007e0003" - -akka.dispatch.Watch = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720013616b6b612e64697370617463682e57617463682e1e65bc74394fc40200024c0007776174636865657400154c616b6b612f6163746f722f4163746f725265663b4c00077761746368657271007e000478707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f46940200007870740007776174636865657371007e0006740007776174636865727671007e0003" - -akka.dispatch.Unwatch = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720015616b6b612e64697370617463682e556e776174636858501f7ee63dc2100200024c0007776174636865657400154c616b6b612f6163746f722f4163746f725265663b4c00077761746368657271007e000478707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f46940200007870740007776174636865657371007e0006740007776174636865727671007e0003" - -akka.dispatch.NoMessage = "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720018616b6b612e64697370617463682e4e6f4d65737361676524b401a3610ccb70dd02000078707671007e0003" diff --git a/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala index 1270d62aca..83e4e194d0 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/TypedActorSpec.scala @@ -211,7 +211,7 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) import TypedActorSpec._ - def newFooBar: Foo = newFooBar(Duration(2, "s")) + def newFooBar: Foo = newFooBar(timeout.duration) def newFooBar(d: FiniteDuration): Foo = TypedActor(system).typedActorOf(TypedProps[Bar](classOf[Foo], classOf[Bar]).withTimeout(Timeout(d))) @@ -221,7 +221,7 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) def newStacked(): Stacked = TypedActor(system).typedActorOf( - TypedProps[StackedImpl](classOf[Stacked], classOf[StackedImpl]).withTimeout(Timeout(2000))) + TypedProps[StackedImpl](classOf[Stacked], classOf[StackedImpl]).withTimeout(timeout)) def mustStop(typedActor: AnyRef) = TypedActor(system).stop(typedActor) must be(true) @@ -296,7 +296,7 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) t.nullJOption() must be === JOption.none t.nullOption() must be === None t.nullReturn() must be === null - Await.result(t.nullFuture(), remaining) must be === null + Await.result(t.nullFuture(), timeout.duration) must be === null } "be able to call Future-returning methods non-blockingly" in { @@ -307,11 +307,11 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) mustStop(t) } - "be able to call multiple Future-returning methods non-blockingly" in { + "be able to call multiple Future-returning methods non-blockingly" in within(timeout.duration) { val t = newFooBar val futures = for (i ← 1 to 20) yield (i, t.futurePigdog(20, i)) for ((i, f) ← futures) { - Await.result(f, timeout.duration) must be("Pigdog" + i) + Await.result(f, remaining) must be("Pigdog" + i) } mustStop(t) } @@ -330,11 +330,11 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) mustStop(t) } - "be able to compose futures without blocking" in { - val t, t2 = newFooBar(2 seconds) + "be able to compose futures without blocking" in within(timeout.duration) { + val t, t2 = newFooBar(remaining) val f = t.futureComposePigdogFrom(t2) f.isCompleted must be(false) - Await.result(f, timeout.duration) must equal("PIGDOG") + Await.result(f, remaining) must equal("PIGDOG") mustStop(t) mustStop(t2) } @@ -391,13 +391,13 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) mustStop(t) } - "be able to support implementation only typed actors" in { + "be able to support implementation only typed actors" in within(timeout.duration) { val t: Foo = TypedActor(system).typedActorOf(TypedProps[Bar]()) val f = t.futurePigdog(200) val f2 = t.futurePigdog(0) f2.isCompleted must be(false) f.isCompleted must be(false) - Await.result(f, timeout.duration) must equal(Await.result(f2, timeout.duration)) + Await.result(f, remaining) must equal(Await.result(f2, remaining)) mustStop(t) } @@ -408,13 +408,13 @@ class TypedActorSpec extends AkkaSpec(TypedActorSpec.config) mustStop(t) } - "be able to use balancing dispatcher" in { + "be able to use balancing dispatcher" in within(timeout.duration) { val thais = for (i ← 1 to 60) yield newFooBar("pooled-dispatcher", 6 seconds) val iterator = new CyclicIterator(thais) val results = for (i ← 1 to 120) yield (i, iterator.next.futurePigdog(200L, i)) - for ((i, r) ← results) Await.result(r, timeout.duration) must be("Pigdog" + i) + for ((i, r) ← results) Await.result(r, remaining) must be("Pigdog" + i) for (t ← thais) mustStop(t) } diff --git a/akka-actor-tests/src/test/scala/akka/serialization/SerializeSpec.scala b/akka-actor-tests/src/test/scala/akka/serialization/SerializeSpec.scala index d3da2418c7..8e1ccd1bdc 100644 --- a/akka-actor-tests/src/test/scala/akka/serialization/SerializeSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/serialization/SerializeSpec.scala @@ -328,26 +328,39 @@ class SerializationCompatibilitySpec extends AkkaSpec(SerializationTests.mostlyR val ser = SerializationExtension(system) "Cross-version serialization compatibility" must { + def verify(obj: Any, asExpected: String): Unit = + String.valueOf(encodeHex(ser.serialize(obj, obj.getClass).get)) must be(asExpected) - "be preserved for SystemMessages" in { - val objs = List[(String, Any)]( - ("akka.dispatch.Create", Create(1234)), - ("akka.dispatch.Recreate", Recreate(FakeThrowable("x"))), - ("akka.dispatch.Suspend", Suspend()), - ("akka.dispatch.Resume", Resume(FakeThrowable("x"))), - ("akka.dispatch.Terminate", Terminate()), - ("akka.dispatch.Supervise", Supervise(FakeActorRef("child"), true, 2468)), - ("akka.dispatch.ChildTerminated", ChildTerminated(FakeActorRef("child"))), - ("akka.dispatch.Watch", Watch(FakeActorRef("watchee"), FakeActorRef("watcher"))), - ("akka.dispatch.Unwatch", Unwatch(FakeActorRef("watchee"), FakeActorRef("watcher"))), - ("akka.dispatch.NoMessage", NoMessage)) - val expectedConf = ConfigFactory.load("akka/serialization/serialized.conf") - for ((key, obj) ← objs) { - val hex = new String(encodeHex(ser.serialize(obj, obj.getClass).get)) - hex must be(expectedConf.getString(key)) - } + "be preserved for the Create SystemMessage" in { + verify(Create(1234), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720014616b6b612e64697370617463682e437265617465bcdf9f7f2675038d0200014900037569647870000004d27671007e0003") + } + "be preserved for the Recreate SystemMessage" in { + verify(Recreate(null), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720016616b6b612e64697370617463682e52656372656174650987c65c8d378a800200014c000563617573657400154c6a6176612f6c616e672f5468726f7761626c653b7870707671007e0003") + } + "be preserved for the Suspend SystemMessage" in { + verify(Suspend(), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720015616b6b612e64697370617463682e53757370656e6464e531d5d134b59902000078707671007e0003") + } + "be preserved for the Resume SystemMessage" in { + verify(Resume(null), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720014616b6b612e64697370617463682e526573756d65dc5e646d445fcb010200014c000f63617573656442794661696c7572657400154c6a6176612f6c616e672f5468726f7761626c653b7870707671007e0003") + } + "be preserved for the Terminate SystemMessage" in { + verify(Terminate(), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720017616b6b612e64697370617463682e5465726d696e61746509d66ca68318700f02000078707671007e0003") + } + "be preserved for the Supervise SystemMessage" in { + verify(Supervise(FakeActorRef("child"), true, 2468), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720017616b6b612e64697370617463682e5375706572766973652d0b363f56ab5feb0200035a00056173796e634900037569644c00056368696c647400154c616b6b612f6163746f722f4163746f725265663b787001000009a47372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f469402000078707400056368696c647671007e0003") + } + "be preserved for the ChildTerminated SystemMessage" in { + verify(ChildTerminated(FakeActorRef("child")), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e000178707372001d616b6b612e64697370617463682e4368696c645465726d696e617465644c84222437ed5db40200014c00056368696c647400154c616b6b612f6163746f722f4163746f725265663b78707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f469402000078707400056368696c647671007e0003") + } + "be preserved for the Watch SystemMessage" in { + verify(Watch(FakeActorRef("watchee"), FakeActorRef("watcher")), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720013616b6b612e64697370617463682e57617463682e1e65bc74394fc40200024c0007776174636865657400154c616b6b612f6163746f722f4163746f725265663b4c00077761746368657271007e000478707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f46940200007870740007776174636865657371007e0006740007776174636865727671007e0003") + } + "be preserved for the Unwatch SystemMessage" in { + verify(Unwatch(FakeActorRef("watchee"), FakeActorRef("watcher")), "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720015616b6b612e64697370617463682e556e776174636858501f7ee63dc2100200024c0007776174636865657400154c616b6b612f6163746f722f4163746f725265663b4c00077761746368657271007e000478707372001f616b6b612e73657269616c697a6174696f6e2e46616b654163746f7252656600000000000000010200014c00046e616d657400124c6a6176612f6c616e672f537472696e673b7872001b616b6b612e6163746f722e496e7465726e616c4163746f725265660d0aa2ca1e82097602000078720013616b6b612e6163746f722e4163746f72526566c3585dde655f46940200007870740007776174636865657371007e0006740007776174636865727671007e0003") + } + "be preserved for the NoMessage SystemMessage" in { + verify(NoMessage, "aced00057372000c7363616c612e5475706c6532bc7daadf46211a990200024c00025f317400124c6a6176612f6c616e672f4f626a6563743b4c00025f3271007e0001787073720018616b6b612e64697370617463682e4e6f4d65737361676524b401a3610ccb70dd02000078707671007e0003") } - } } diff --git a/akka-actor-tests/src/test/scala/akka/util/ByteStringSpec.scala b/akka-actor-tests/src/test/scala/akka/util/ByteStringSpec.scala index b1a40c8cb7..117de28242 100644 --- a/akka-actor-tests/src/test/scala/akka/util/ByteStringSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/util/ByteStringSpec.scala @@ -275,8 +275,8 @@ class ByteStringSpec extends WordSpec with MustMatchers with Checkers { check { (a: ByteString) ⇒ a.asByteBuffers.foldLeft(ByteString.empty) { (bs, bb) ⇒ bs ++ ByteString(bb) } == a } check { (a: ByteString) ⇒ a.asByteBuffers.forall(_.isReadOnly) } check { (a: ByteString) ⇒ - import scala.collection.JavaConverters.iterableAsScalaIterableConverter; - a.asByteBuffers.zip(a.getByteBuffers().asScala).forall(x ⇒ x._1 == x._2) + import scala.collection.JavaConverters.iterableAsScalaIterableConverter; + a.asByteBuffers.zip(a.getByteBuffers().asScala).forall(x ⇒ x._1 == x._2) } } } diff --git a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala index 0e9705fb65..a08a3d0311 100644 --- a/akka-actor/src/main/scala/akka/actor/ActorSystem.scala +++ b/akka-actor/src/main/scala/akka/actor/ActorSystem.scala @@ -20,7 +20,6 @@ import scala.concurrent.{ Await, Awaitable, CanAwait, Future, ExecutionContext } import scala.util.{ Failure, Success } import scala.util.control.{ NonFatal, ControlThrowable } - object ActorSystem { val Version: String = "2.2-SNAPSHOT" diff --git a/akka-osgi/src/main/resources/akka-actor.conf b/akka-osgi/src/main/resources/akka-actor.conf new file mode 100644 index 0000000000..0039320631 --- /dev/null +++ b/akka-osgi/src/main/resources/akka-actor.conf @@ -0,0 +1,406 @@ +#################################### +# Akka Actor Reference Config File # +#################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + # Akka version, checked against the runtime version of Akka. + version = "2.2-SNAPSHOT" + + # Home directory of Akka, modules in the deploy directory will be loaded + home = "" + + # Event handlers to register at boot time (Logging$DefaultLogger logs to STDOUT) + event-handlers = ["akka.event.Logging$DefaultLogger"] + + # Event handlers are created and registered synchronously during ActorSystem + # start-up, and since they are actors, this timeout is used to bound the + # waiting time + event-handler-startup-timeout = 5s + + # Log level used by the configured loggers (see "event-handlers") as soon + # as they have been started; before that, see "stdout-loglevel" + # Options: ERROR, WARNING, INFO, DEBUG + loglevel = "INFO" + + # Log level for the very basic logger activated during AkkaApplication startup + # Options: ERROR, WARNING, INFO, DEBUG + stdout-loglevel = "WARNING" + + # Log the complete configuration at INFO level when the actor system is started. + # This is useful when you are uncertain of what configuration is used. + log-config-on-start = off + + # List FQCN of extensions which shall be loaded at actor system startup. + # Should be on the format: 'extensions = ["foo", "bar"]' etc. + # See the Akka Documentation for more info about Extensions + extensions = [] + + # Toggles whether threads created by this ActorSystem should be daemons or not + daemonic = off + + # JVM shutdown, System.exit(-1), in case of a fatal error, + # such as OutOfMemoryError + jvm-exit-on-fatal-error = on + + actor { + + # FQCN of the ActorRefProvider to be used; the below is the built-in default, + # another one is akka.remote.RemoteActorRefProvider in the akka-remote bundle. + provider = "akka.actor.LocalActorRefProvider" + + # The guardian "/user" will use this class to obtain its supervisorStrategy. + # It needs to be a subclass of akka.actor.SupervisorStrategyConfigurator. + # In addition to the default there is akka.actor.StoppingSupervisorStrategy. + guardian-supervisor-strategy = "akka.actor.DefaultSupervisorStrategy" + + # Timeout for ActorSystem.actorOf + creation-timeout = 20s + + # Frequency with which stopping actors are prodded in case they had to be + # removed from their parents + reaper-interval = 5s + + # Serializes and deserializes (non-primitive) messages to ensure immutability, + # this is only intended for testing. + serialize-messages = off + + # Serializes and deserializes creators (in Props) to ensure that they can be + # sent over the network, this is only intended for testing. + serialize-creators = off + + # Timeout for send operations to top-level actors which are in the process + # of being started. This is only relevant if using a bounded mailbox or the + # CallingThreadDispatcher for a top-level actor. + unstarted-push-timeout = 10s + + typed { + # Default timeout for typed actor methods with non-void return type + timeout = 5s + } + + deployment { + + # deployment id pattern - on the format: /parent/child etc. + default { + + # routing (load-balance) scheme to use + # - available: "from-code", "round-robin", "random", "smallest-mailbox", + # "scatter-gather", "broadcast" + # - or: Fully qualified class name of the router class. + # The class must extend akka.routing.CustomRouterConfig and + # have a constructor with com.typesafe.config.Config + # parameter. + # - default is "from-code"; + # Whether or not an actor is transformed to a Router is decided in code + # only (Props.withRouter). The type of router can be overridden in the + # configuration; specifying "from-code" means that the values specified + # in the code shall be used. + # In case of routing, the actors to be routed to can be specified + # in several ways: + # - nr-of-instances: will create that many children + # - routees.paths: will look the paths up using actorFor and route to + # them, i.e. will not create children + # - resizer: dynamically resizable number of routees as specified in + # resizer below + router = "from-code" + + # number of children to create in case of a non-direct router; + # this setting is ignored if routees.paths is given + nr-of-instances = 1 + + # within is the timeout used for routers containing future calls + within = 5 seconds + + # number of virtual nodes per node for consistent-hashing router + virtual-nodes-factor = 10 + + routees { + # Alternatively to giving nr-of-instances you can specify the full + # paths of those actors which should be routed to. This setting takes + # precedence over nr-of-instances + paths = [] + } + + # Routers with dynamically resizable number of routees; this feature is + # enabled by including (parts of) this section in the deployment + resizer { + + # The fewest number of routees the router should ever have. + lower-bound = 1 + + # The most number of routees the router should ever have. + # Must be greater than or equal to lower-bound. + upper-bound = 10 + + # Threshold used to evaluate if a routee is considered to be busy + # (under pressure). Implementation depends on this value (default is 1). + # 0: number of routees currently processing a message. + # 1: number of routees currently processing a message has + # some messages in mailbox. + # > 1: number of routees with at least the configured pressure-threshold + # messages in their mailbox. Note that estimating mailbox size of + # default UnboundedMailbox is O(N) operation. + pressure-threshold = 1 + + # Percentage to increase capacity whenever all routees are busy. + # For example, 0.2 would increase 20% (rounded up), i.e. if current + # capacity is 6 it will request an increase of 2 more routees. + rampup-rate = 0.2 + + # Minimum fraction of busy routees before backing off. + # For example, if this is 0.3, then we'll remove some routees only when + # less than 30% of routees are busy, i.e. if current capacity is 10 and + # 3 are busy then the capacity is unchanged, but if 2 or less are busy + # the capacity is decreased. + # Use 0.0 or negative to avoid removal of routees. + backoff-threshold = 0.3 + + # Fraction of routees to be removed when the resizer reaches the + # backoffThreshold. + # For example, 0.1 would decrease 10% (rounded up), i.e. if current + # capacity is 9 it will request an decrease of 1 routee. + backoff-rate = 0.1 + + # When the resizer reduce the capacity the abandoned routee actors are + # stopped with PoisonPill after this delay. The reason for the delay is + # to give concurrent messages a chance to be placed in mailbox before + # sending PoisonPill. + # Use 0s to skip delay. + stop-delay = 1s + + # Number of messages between resize operation. + # Use 1 to resize before each message. + messages-per-resize = 10 + } + } + } + + # Default dispatcher for Actors that extend Stash + default-stash-dispatcher { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" + } + + default-dispatcher { + # Must be one of the following + # Dispatcher, (BalancingDispatcher, only valid when all actors using it are + # of the same type), PinnedDispatcher, or a FQCN to a class inheriting + # MessageDispatcherConfigurator with a constructor with + # both com.typesafe.config.Config parameter and + # akka.dispatch.DispatcherPrerequisites parameters. + # PinnedDispatcher must be used toghether with executor=thread-pool-executor. + type = "Dispatcher" + + # Which kind of ExecutorService to use for this dispatcher + # Valid options: + # - "fork-join-executor" requires a "fork-join-executor" section + # - "thread-pool-executor" requires a "thread-pool-executor" section + # - A FQCN of a class extending ExecutorServiceConfigurator + executor = "fork-join-executor" + + # This will be used if you have set "executor = "fork-join-executor"" + fork-join-executor { + # Min number of threads to cap factor-based parallelism number to + parallelism-min = 8 + + # The parallelism factor is used to determine thread pool size using the + # following formula: ceil(available processors * factor). Resulting size + # is then bounded by the parallelism-min and parallelism-max values. + parallelism-factor = 3.0 + + # Max number of threads to cap factor-based parallelism number to + parallelism-max = 64 + } + + # This will be used if you have set "executor = "thread-pool-executor"" + thread-pool-executor { + # Keep alive time for threads + keep-alive-time = 60s + + # Min number of threads to cap factor-based core number to + core-pool-size-min = 8 + + # The core pool size factor is used to determine thread pool core size + # using the following formula: ceil(available processors * factor). + # Resulting size is then bounded by the core-pool-size-min and + # core-pool-size-max values. + core-pool-size-factor = 3.0 + + # Max number of threads to cap factor-based number to + core-pool-size-max = 64 + + # Minimum number of threads to cap factor-based max number to + # (if using a bounded task queue) + max-pool-size-min = 8 + + # Max no of threads (if using a bounded task queue) is determined by + # calculating: ceil(available processors * factor) + max-pool-size-factor = 3.0 + + # Max number of threads to cap factor-based max number to + # (if using a bounded task queue) + max-pool-size-max = 64 + + # Specifies the bounded capacity of the task queue (< 1 == unbounded) + task-queue-size = -1 + + # Specifies which type of task queue will be used, can be "array" or + # "linked" (default) + task-queue-type = "linked" + + # Allow core threads to time out + allow-core-timeout = on + } + + # How long time the dispatcher will wait for new actors until it shuts down + shutdown-timeout = 1s + + # Throughput defines the number of messages that are processed in a batch + # before the thread is returned to the pool. Set to 1 for as fair as possible. + throughput = 5 + + # Throughput deadline for Dispatcher, set to 0 or negative for no deadline + throughput-deadline-time = 0ms + + # If negative (or zero) then an unbounded mailbox is used (default) + # If positive then a bounded mailbox is used and the capacity is set using + # the property + # NOTE: setting a mailbox to 'blocking' can be a bit dangerous, could lead + # to deadlock, use with care + # The following mailbox-push-timeout-time is only used for type=Dispatcher + # and only if mailbox-capacity > 0 + mailbox-capacity = -1 + + # Specifies the timeout to add a new message to a mailbox that is full - + # negative number means infinite timeout. It is only used for type=Dispatcher + # and only if mailbox-capacity > 0 + mailbox-push-timeout-time = 10s + + # FQCN of the MailboxType, if not specified the default bounded or unbounded + # mailbox is used. The Class of the FQCN must have a constructor with + # (akka.actor.ActorSystem.Settings, com.typesafe.config.Config) parameters. + mailbox-type = "" + + # For BalancingDispatcher: If the balancing dispatcher should attempt to + # schedule idle actors using the same dispatcher when a message comes in, + # and the dispatchers ExecutorService is not fully busy already. + attempt-teamwork = on + + # For Actor with Stash: The default capacity of the stash. + # If negative (or zero) then an unbounded stash is used (default) + # If positive then a bounded stash is used and the capacity is set using + # the property + stash-capacity = -1 + } + + debug { + # enable function of Actor.loggable(), which is to log any received message + # at DEBUG level, see the “Testing Actor Systems” section of the Akka + # Documentation at http://akka.io/docs + receive = off + + # enable DEBUG logging of all AutoReceiveMessages (Kill, PoisonPill et.c.) + autoreceive = off + + # enable DEBUG logging of actor lifecycle changes + lifecycle = off + + # enable DEBUG logging of all LoggingFSMs for events, transitions and timers + fsm = off + + # enable DEBUG logging of subscription changes on the eventStream + event-stream = off + + # enable DEBUG logging of unhandled messages + unhandled = off + + # enable WARN logging of misconfigured routers + router-misconfiguration = off + } + + # Entries for pluggable serializers and their bindings. + serializers { + java = "akka.serialization.JavaSerializer" + bytes = "akka.serialization.ByteArraySerializer" + } + + # Class to Serializer binding. You only need to specify the name of an + # interface or abstract base class of the messages. In case of ambiguity it + # is using the most specific configured class, or giving a warning and + # choosing the “first” one. + # + # To disable one of the default serializers, assign its class to "none", like + # "java.io.Serializable" = none + serialization-bindings { + "[B" = bytes + "java.io.Serializable" = java + } + + # Configuration items which are used by the akka.actor.ActorDSL._ methods + dsl { + # Maximum queue size of the actor created by newInbox(); this protects + # against faulty programs which use select() and consistently miss messages + inbox-size = 1000 + + # Default timeout to assume for operations like Inbox.receive et al + default-timeout = 5s + } + } + + # Used to set the behavior of the scheduler. + # Changing the default values may change the system behavior drastically so make + # sure you know what you're doing! See the Scheduler section of the Akka + # Documentation for more details. + scheduler { + # The HashedWheelTimer (HWT) implementation from Netty is used as the default + # scheduler in the system. + # HWT does not execute the scheduled tasks on exact time. + # It will, on every tick, check if there are any tasks behind the schedule + # and execute them. You can increase or decrease the accuracy of the execution + # timing by specifying smaller or larger tick duration. + # If you are scheduling a lot of tasks you should consider increasing the + # ticks per wheel. + # For more information see: http://www.jboss.org/netty/ + tick-duration = 100ms + + # The timer uses a circular wheel of buckets to store the timer tasks. + # This should be set such that the majority of scheduled timeouts (for high + # scheduling frequency) will be shorter than one rotation of the wheel + # (ticks-per-wheel * ticks-duration) + # THIS MUST BE A POWER OF TWO! + ticks-per-wheel = 512 + + # This setting selects the timer implementation which shall be loaded at + # system start-up. Built-in choices are: + # - akka.actor.DefaultScheduler (HWT) + # - akka.actor.LightArrayRevolverScheduler + # (to be benchmarked and evaluated) + # The class given here must implement the akka.actor.Scheduler interface + # and offer a constructor which takes three arguments: + # 1) com.typesafe.config.Config + # 2) akka.event.LoggingAdapter + # 3) java.util.concurrent.ThreadFactory + implementation = akka.actor.LightArrayRevolverScheduler + + # When shutting down the scheduler, there will typically be a thread which + # needs to be stopped, and this timeout determines how long to wait for + # that to happen. In case of timeout the shutdown of the actor system will + # proceed without running possibly still enqueued tasks. + shutdown-timeout = 5s + } + + io { + # In bytes, the size of the shared read buffer. In the span 0b..2GiB. + # + read-buffer-size = 8KiB + + # Specifies how many ops are done between every descriptor selection + select-interval = 100 + + # Number of connections that are allowed in the backlog. + # 0 or negative means that the platform default will be used. + default-backlog = 1000 + } +} diff --git a/akka-osgi/src/main/resources/akka-agent.conf b/akka-osgi/src/main/resources/akka-agent.conf new file mode 100644 index 0000000000..cf57b869de --- /dev/null +++ b/akka-osgi/src/main/resources/akka-agent.conf @@ -0,0 +1,23 @@ +#################################### +# Akka Agent Reference Config File # +#################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + agent { + + # The dispatcher used for agent-send-off actor + send-off-dispatcher { + executor = thread-pool-executor + type = PinnedDispatcher + } + + # The dispatcher used for agent-alter-off actor + alter-off-dispatcher { + executor = thread-pool-executor + type = PinnedDispatcher + } + } +} diff --git a/akka-osgi/src/main/resources/akka-camel.conf b/akka-osgi/src/main/resources/akka-camel.conf new file mode 100644 index 0000000000..12bed5c28b --- /dev/null +++ b/akka-osgi/src/main/resources/akka-camel.conf @@ -0,0 +1,36 @@ +#################################### +# Akka Camel Reference Config File # +#################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + camel { + # Whether JMX should be enabled or disabled for the Camel Context + jmx = off + # enable/disable streaming cache on the Camel Context + streamingCache = on + consumer { + # Configured setting which determines whether one-way communications + # between an endpoint and this consumer actor + # should be auto-acknowledged or application-acknowledged. + # This flag has only effect when exchange is in-only. + auto-ack = on + + # When endpoint is out-capable (can produce responses) reply-timeout is the + # maximum time the endpoint can take to send the response before the message + # exchange fails. This setting is used for out-capable, in-only, + # manually acknowledged communication. + reply-timeout = 1m + + # The duration of time to await activation of an endpoint. + activation-timeout = 10s + } + + #Scheme to FQCN mappings for CamelMessage body conversions + conversions { + "file" = "java.io.InputStream" + } + } +} diff --git a/akka-osgi/src/main/resources/akka-cluster-experimental.conf b/akka-osgi/src/main/resources/akka-cluster-experimental.conf new file mode 100644 index 0000000000..4532c0ff8a --- /dev/null +++ b/akka-osgi/src/main/resources/akka-cluster-experimental.conf @@ -0,0 +1,217 @@ +###################################### +# Akka Cluster Reference Config File # +###################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + + cluster { + # Initial contact points of the cluster. + # The nodes to join at startup if auto-join = on. + # Comma separated full URIs defined by a string on the form of + # "akka://system@hostname:port" + # Leave as empty if the node should be a singleton cluster. + seed-nodes = [] + + # how long to wait for one of the seed nodes to reply to initial join request + seed-node-timeout = 5s + + # Automatic join the seed-nodes at startup. + # If seed-nodes is empty it will join itself and become a single node cluster. + auto-join = on + + # Should the 'leader' in the cluster be allowed to automatically mark + # unreachable nodes as DOWN? + # Using auto-down implies that two separate clusters will automatically be + # formed in case of network partition. + auto-down = off + + # Minimum required number of members before the leader changes member status + # of 'Joining' members to 'Up'. Typically used together with + # 'Cluster.registerOnMemberUp' to defer some action, such as starting actors, + # until the cluster has reached a certain size. + min-nr-of-members = 1 + + # Enable or disable JMX MBeans for management of the cluster + jmx.enabled = on + + # how long should the node wait before starting the periodic tasks + # maintenance tasks? + periodic-tasks-initial-delay = 1s + + # how often should the node send out gossip information? + gossip-interval = 1s + + # how often should the leader perform maintenance tasks? + leader-actions-interval = 1s + + # how often should the node move nodes, marked as unreachable by the failure + # detector, out of the membership ring? + unreachable-nodes-reaper-interval = 1s + + # How often the current internal stats should be published. + # A value of 0 s can be used to always publish the stats, when it happens. + publish-stats-interval = 10s + + # The id of the dispatcher to use for cluster actors. If not specified + # default dispatcher is used. + # If specified you need to define the settings of the actual dispatcher. + use-dispatcher = "" + + # Gossip to random node with newer or older state information, if any with + # this probability. Otherwise Gossip to any random live node. + # Probability value is between 0.0 and 1.0. 0.0 means never, 1.0 means always. + gossip-different-view-probability = 0.8 + + # Limit number of merge conflicts per second that are handled. If the limit is + # exceeded the conflicting gossip messages are dropped and will reappear later. + max-gossip-merge-rate = 5.0 + + failure-detector { + + # FQCN of the failure detector implementation. + # It must implement akka.cluster.FailureDetector and + # have constructor with akka.actor.ActorSystem and + # akka.cluster.ClusterSettings parameters + implementation-class = "akka.cluster.AccrualFailureDetector" + + # how often should the node send out heartbeats? + heartbeat-interval = 1s + + # Number of member nodes that each member will send heartbeat messages to, + # i.e. each node will be monitored by this number of other nodes. + monitored-by-nr-of-members = 5 + + # defines the failure detector threshold + # A low threshold is prone to generate many wrong suspicions but ensures + # a quick detection in the event of a real crash. Conversely, a high + # threshold generates fewer mistakes but needs more time to detect + # actual crashes + threshold = 8.0 + + # Minimum standard deviation to use for the normal distribution in + # AccrualFailureDetector. Too low standard deviation might result in + # too much sensitivity for sudden, but normal, deviations in heartbeat + # inter arrival times. + min-std-deviation = 100 ms + + # Number of potentially lost/delayed heartbeats that will be + # accepted before considering it to be an anomaly. + # It is a factor of heartbeat-interval. + # This margin is important to be able to survive sudden, occasional, + # pauses in heartbeat arrivals, due to for example garbage collect or + # network drop. + acceptable-heartbeat-pause = 3s + + # Number of samples to use for calculation of mean and standard deviation of + # inter-arrival times. + max-sample-size = 1000 + + # When a node stops sending heartbeats to another node it will end that + # with this number of EndHeartbeat messages, which will remove the + # monitoring from the failure detector. + nr-of-end-heartbeats = 8 + + # When no expected heartbeat message has been received an explicit + # heartbeat request is sent to the node that should emit heartbeats. + heartbeat-request { + # Grace period until an explicit heartbeat request is sent + grace-period = 10 s + + # After the heartbeat request has been sent the first failure detection + # will start after this period, even though no heartbeat mesage has + # been received. + expected-response-after = 3 s + + # Cleanup of obsolete heartbeat requests + time-to-live = 60 s + } + } + + metrics { + # Enable or disable metrics collector for load-balancing nodes. + enabled = on + + # FQCN of the metrics collector implementation. + # It must implement akka.cluster.cluster.MetricsCollector and + # have constructor with akka.actor.ActorSystem parameter. + # The default SigarMetricsCollector uses JMX and Hyperic SIGAR, if SIGAR + # is on the classpath, otherwise only JMX. + collector-class = "akka.cluster.SigarMetricsCollector" + + # How often metrics are sampled on a node. + # Shorter interval will collect the metrics more often. + collect-interval = 3s + + # How often a node publishes metrics information. + gossip-interval = 3s + + # How quickly the exponential weighting of past data is decayed compared to + # new data. Set lower to increase the bias toward newer values. + # The relevance of each data sample is halved for every passing half-life duration, + # i.e. after 4 times the half-life, a data sample’s relevance is reduced to 6% of + # its original relevance. The initial relevance of a data sample is given by + # 1 – 0.5 ^ (collect-interval / half-life). + # See http://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average + moving-average-half-life = 12s + } + + # If the tick-duration of the default scheduler is longer than the + # tick-duration configured here a dedicated scheduler will be used for + # periodic tasks of the cluster, otherwise the default scheduler is used. + # See akka.scheduler settings for more details about the HashedWheelTimer. + scheduler { + tick-duration = 33ms + ticks-per-wheel = 512 + } + + # Netty blocks when sending to broken connections, and this circuit breaker + # is used to reduce connect attempts to broken connections. + send-circuit-breaker { + max-failures = 3 + call-timeout = 2 s + reset-timeout = 30 s + } + } + + # Default configuration for routers + actor.deployment.default { + # MetricsSelector to use + # - available: "mix", "heap", "cpu", "load" + # - or: Fully qualified class name of the MetricsSelector class. + # The class must extend akka.cluster.routing.MetricsSelector + # and have a constructor with com.typesafe.config.Config + # parameter. + # - default is "mix" + metrics-selector = mix + } + actor.deployment.default.cluster { + # enable cluster aware router that deploys to nodes in the cluster + enabled = off + + # Maximum number of routees that will be deployed on each cluster + # member node. + # Note that nr-of-instances defines total number of routees, but + # number of routees per node will not be exceeded, i.e. if you + # define nr-of-instances = 50 and max-nr-of-instances-per-node = 2 + # it will deploy 2 routees per new member in the cluster, up to + # 25 members. + max-nr-of-instances-per-node = 1 + + # Defines if routees are allowed to be located on the same node as + # the head router actor, or only on remote nodes. + # Useful for master-worker scenario where all routees are remote. + allow-local-routees = on + + # Actor path of the routees to lookup with actorFor on the member + # nodes in the cluster. E.g. "/user/myservice". If this isn't defined + # the routees will be deployed instead of looked up. + # max-nr-of-instances-per-node should not be configured (default value is 1) + # when routees-path is defined. + routees-path = "" + + } + +} diff --git a/akka-osgi/src/main/resources/akka-file-mailbox.conf b/akka-osgi/src/main/resources/akka-file-mailbox.conf new file mode 100644 index 0000000000..66f125e624 --- /dev/null +++ b/akka-osgi/src/main/resources/akka-file-mailbox.conf @@ -0,0 +1,69 @@ +############################################# +# Akka File Mailboxes Reference Config File # +############################################# + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. +# +# For more information see + +akka { + actor { + mailbox { + file-based { + # directory below which this queue resides + directory-path = "./_mb" + + # attempting to add an item after the queue reaches this size (in items) + # will fail. + max-items = 2147483647 + + # attempting to add an item after the queue reaches this size (in bytes) + # will fail. + max-size = 2147483647 bytes + + # attempting to add an item larger than this size (in bytes) will fail. + max-item-size = 2147483647 bytes + + # maximum expiration time for this queue (seconds). + max-age = 0s + + # maximum journal size before the journal should be rotated. + max-journal-size = 16 MiB + + # maximum size of a queue before it drops into read-behind mode. + max-memory-size = 128 MiB + + # maximum overflow (multiplier) of a journal file before we re-create it. + max-journal-overflow = 10 + + # absolute maximum size of a journal file until we rebuild it, + # no matter what. + max-journal-size-absolute = 9223372036854775807 bytes + + # whether to drop older items (instead of newer) when the queue is full + discard-old-when-full = on + + # whether to keep a journal file at all + keep-journal = on + + # whether to sync the journal after each transaction + sync-journal = off + + # circuit breaker configuration + circuit-breaker { + # maximum number of failures before opening breaker + max-failures = 3 + + # duration of time beyond which a call is assumed to be timed out and + # considered a failure + call-timeout = 3 seconds + + # duration of time to wait until attempting to reset the breaker during + # which all calls fail-fast + reset-timeout = 30 seconds + } + } + } + } +} diff --git a/akka-osgi/src/main/resources/akka-osgi.conf b/akka-osgi/src/main/resources/akka-osgi.conf new file mode 100644 index 0000000000..e69de29bb2 diff --git a/akka-osgi/src/main/resources/akka-remote.conf b/akka-osgi/src/main/resources/akka-remote.conf new file mode 100644 index 0000000000..8cf1adccc7 --- /dev/null +++ b/akka-osgi/src/main/resources/akka-remote.conf @@ -0,0 +1,299 @@ +##################################### +# Akka Remote Reference Config File # +##################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +# comments about akka.actor settings left out where they are already in akka- +# actor.jar, because otherwise they would be repeated in config rendering. + +akka { + + actor { + + serializers { + proto = "akka.remote.serialization.ProtobufSerializer" + daemon-create = "akka.remote.serialization.DaemonMsgCreateSerializer" + } + + + serialization-bindings { + # Since com.google.protobuf.Message does not extend Serializable but + # GeneratedMessage does, need to use the more specific one here in order + # to avoid ambiguity + "com.google.protobuf.GeneratedMessage" = proto + "akka.remote.DaemonMsgCreate" = daemon-create + } + + deployment { + + default { + + # if this is set to a valid remote address, the named actor will be + # deployed at that node e.g. "akka://sys@host:port" + remote = "" + + target { + + # A list of hostnames and ports for instantiating the children of a + # non-direct router + # The format should be on "akka://sys@host:port", where: + # - sys is the remote actor system name + # - hostname can be either hostname or IP address the remote actor + # should connect to + # - port should be the port for the remote server on the other node + # The number of actor instances to be spawned is still taken from the + # nr-of-instances setting as for local routers; the instances will be + # distributed round-robin among the given nodes. + nodes = [] + + } + } + } + } + + remote { + + ### General settings + + # Timeout after which the startup of the remoting subsystem is considered to be failed. + # Increase this value if your transport drivers (see the enabled-transports section) + # need longer time to be loaded. + startup-timeout = 5 s + + # Timout after which the graceful shutdown of the remoting subsystem is considered to be failed. + # After the timeout the remoting system is forcefully shut down. + # Increase this value if your transport drivers (see the enabled-transports section) + # need longer time to stop properly. + shutdown-timeout = 5 s + + # Before shutting down the drivers, the remoting subsystem attempts to flush all pending + # writes. This setting controls the maximum time the remoting is willing to wait before + # moving on to shut down the drivers. + flush-wait-on-shutdown = 2 s + + # Reuse inbound connections for outbound messages + use-passive-connections = on + + # Dispatcher that the actors responsible to write to a connection will use. + # The mailbox type must be always a DequeBasedMailbox. + writer-dispatcher { + mailbox-type = "akka.dispatch.UnboundedDequeBasedMailbox" + } + + # If enabled, an inbound connection is only considered to be live after the remote + # system sent an explicit acknowledgement. + # It is recommended to leave this setting on when connectionless transports (e.g. UDP) + # are used. + wait-activity-enabled = on + + # Controls the backoff interval after a refused write is reattempted. (Transports may + # refuse writes if their internal buffer is full) + backoff-interval = 0.01 s + + # Acknowledgment timeout of management commands sent to the transport stack. + command-ack-timeout = 30 s + + ### Security settings + + # Enable untrusted mode for full security of server managed actors, prevents + # system messages to be send by clients, e.g. messages like 'Create', + # 'Suspend', 'Resume', 'Terminate', 'Supervise', 'Link' etc. + untrusted-mode = off + + # Should the remote server require that its peers share the same + # secure-cookie (defined in the 'remote' section)? Secure cookies are passed + # between during the initial handshake. Connections are refused if the initial + # message contains a mismatching cookie or the cookie is missing. + require-cookie = off + + # Generate your own with the script availbale in + # '$AKKA_HOME/scripts/generate_config_with_secure_cookie.sh' or using + # 'akka.util.Crypt.generateSecureCookie' + secure-cookie = "" + + ### Logging + + # If this is "on", Akka will log all inbound messages at DEBUG level, + # if off then they are not logged + log-received-messages = off + + # If this is "on", Akka will log all outbound messages at DEBUG level, + # if off then they are not logged + log-sent-messages = off + + # If this is "on", Akka will log all RemoteLifeCycleEvents at the level + # defined for each, if off then they are not logged. Failures to deserialize + # received messages also fall under this flag. + log-remote-lifecycle-events = off + + ### Failure detection and recovery + + # how often should keep-alive heartbeat messages sent to connections. + heartbeat-interval = 1 s + + # Settings for the Phi accrual failure detector (http://ddg.jaist.ac.jp/pub/HDY+04.pdf + # [Hayashibara et al]) used by the remoting subsystem to detect failed connections. + failure-detector { + # defines the failure detector threshold + # A low threshold is prone to generate many wrong suspicions but ensures + # a quick detection in the event of a real crash. Conversely, a high + # threshold generates fewer mistakes but needs more time to detect + # actual crashes + threshold = 7.0 + + # Number of the samples of inter-heartbeat arrival times to adaptively + # calculate the failure timeout for connections. + max-sample-size = 100 + + # Minimum standard deviation to use for the normal distribution in + # AccrualFailureDetector. Too low standard deviation might result in + # too much sensitivity for sudden, but normal, deviations in heartbeat + # inter arrival times. + min-std-deviation = 100 ms + + # Number of potentially lost/delayed heartbeats that will be + # accepted before considering it to be an anomaly. + # It is a factor of heartbeat-interval. + # This margin is important to be able to survive sudden, occasional, + # pauses in heartbeat arrivals, due to for example garbage collect or + # network drop. + acceptable-heartbeat-pause = 3 s + } + + # After failed to establish an outbound connection, the remoting will mark the + # address as failed. This configuration option controls how much time should + # be elapsed before reattempting a new connection. While the address is + # gated, all messages sent to the address are delivered to dead-letters. + # If this setting is 0, the remoting will always immediately reattempt + # to establish a failed outbound connection and will buffer writes until + # it succeeds. + retry-gate-closed-for = 0 s + + # If the retry gate function is disabled (see retry-gate-closed-for) the + # remoting subsystem will always attempt to reestablish failed outbound + # connections. The settings below together control the maximum number of + # reattempts in a given time window. The number of reattempts during + # a window of "retry-window" will be maximum "maximum-retries-in-window". + retry-window = 3 s + maximum-retries-in-window = 5 + + ### Transports and adapters + + # List of the transport drivers that will be loaded by the remoting. + # A list of fully qualified config paths must be provided where + # the given configuration path contains a transport-class key + # pointing to an implementation class of the Transport interface. + # If multiple transports are provided, the address of the first + # one will be used as a default address. + enabled-transports = ["akka.remote.netty.tcp"] + + # Transport drivers can be augmented with adapters by adding their + # name to the applied-adapters setting in the configuration of a + # transport. The available adapters should be configured in this + # section by providing a name, and the fully qualified name of + # their corresponding implementation + adapters { + gremlin = "akka.remote.transport.FailureInjectorProvider" + trttl = "akka.remote.transport.ThrottlerProvider" + } + + ### Default configuration for the Netty based transport drivers + + netty.tcp { + transport-class = "akka.remote.transport.netty.NettyTransport" + + # Transport drivers can be augmented with adapters by adding their + # name to the applied-adapters list. The last adapter in the + # list is the adapter immediately above the driver, while + # the first one is the top of the stack below the standard + # Akka protocol + applied-adapters = [] + + transport-protocol = tcp + + # The default remote server port clients should connect to. + # Default is 2552 (AKKA), use 0 if you want a random available port + # This port needs to be unique for each actor system on the same machine. + port = 2552 + + # The hostname or ip to bind the remoting to, + # InetAddress.getLocalHost.getHostAddress is used if empty + hostname = "" + + # Enables SSL support on this transport + enable-ssl = false + + # Sets the connectTimeoutMillis of all outbound connections, + # i.e. how long a connect may take until it is timed out + connection-timeout = 120s + + # If set to "" then the specified dispatcher + # will be used to accept inbound connections, and perform IO. If "" then + # dedicated threads will be used. + use-dispatcher-for-io = "" + + # Sets the high water mark for the in and outbound sockets, + # set to 0b for platform default + write-buffer-high-water-mark = 0b + + # Sets the low water mark for the in and outbound sockets, + # set to 0b for platform default + write-buffer-low-water-mark = 0b + + # Sets the send buffer size of the Sockets, + # set to 0b for platform default + send-buffer-size = 32000b + + # Sets the receive buffer size of the Sockets, + # set to 0b for platform default + receive-buffer-size = 32000b + + # Sets the size of the connection backlog + backlog = 4096 + + # Used to configure the number of I/O worker threads on server sockets + server-socket-worker-pool { + # Min number of threads to cap factor-based number to + pool-size-min = 2 + + # The pool size factor is used to determine thread pool size + # using the following formula: ceil(available processors * factor). + # Resulting size is then bounded by the pool-size-min and + # pool-size-max values. + pool-size-factor = 1.0 + + # Max number of threads to cap factor-based number to + pool-size-max = 8 + } + + # Used to configure the number of I/O worker threads on client sockets + client-socket-worker-pool { + # Min number of threads to cap factor-based number to + pool-size-min = 2 + + # The pool size factor is used to determine thread pool size + # using the following formula: ceil(available processors * factor). + # Resulting size is then bounded by the pool-size-min and + # pool-size-max values. + pool-size-factor = 1.0 + + # Max number of threads to cap factor-based number to + pool-size-max = 8 + } + } + + netty.udp = ${akka.remote.netty.tcp} + netty.udp { + transport-protocol = udp + } + + netty.ssl = ${akka.remote.netty.tcp} + netty.ssl = { + enable-ssl = true + } + + } + +} diff --git a/akka-osgi/src/main/resources/akka-transactor.conf b/akka-osgi/src/main/resources/akka-transactor.conf new file mode 100644 index 0000000000..d1216bd73e --- /dev/null +++ b/akka-osgi/src/main/resources/akka-transactor.conf @@ -0,0 +1,13 @@ +######################################### +# Akka Transactor Reference Config File # +######################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + transactor { + # The timeout used for coordinated transactions across actors + coordinated-timeout = 5s + } +} diff --git a/akka-osgi/src/main/resources/akka-zeromq.conf b/akka-osgi/src/main/resources/akka-zeromq.conf new file mode 100644 index 0000000000..6a83e1a166 --- /dev/null +++ b/akka-osgi/src/main/resources/akka-zeromq.conf @@ -0,0 +1,26 @@ +##################################### +# Akka ZeroMQ Reference Config File # +##################################### + +# This is the reference config file that contains all the default settings. +# Make your edits/overrides in your application.conf. + +akka { + + zeromq { + + # The default timeout for a poll on the actual zeromq socket. + poll-timeout = 100ms + + # Timeout for creating a new socket + new-socket-timeout = 5s + + socket-dispatcher { + # A zeromq socket needs to be pinned to the thread that created it. + # Changing this value results in weird errors and race conditions within + # zeromq + executor = thread-pool-executor + type = "PinnedDispatcher" + } + } +} diff --git a/akka-osgi/src/main/resources/reference.conf b/akka-osgi/src/main/resources/reference.conf new file mode 100644 index 0000000000..70545b2e2d --- /dev/null +++ b/akka-osgi/src/main/resources/reference.conf @@ -0,0 +1,9 @@ +include "akka-actor.conf" +include "akka-agent.conf" +include "akka-camel.conf" +include "akka-cluster-experimental.conf" +include "akka-file-mailbox.conf" +include "akka-osgi.conf" +include "akka-remote.conf" +include "akka-transactor.conf" +include "akka-zeromq.conf" \ No newline at end of file