Skip to content

Commit

Permalink
Change default mailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
r0qs committed Dec 24, 2015
1 parent f2a1079 commit 3d1e0a6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion benchmark/debug/cfabcast-debug.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 5,7 @@ akka {
#stdout-loglevel = "OFF"
#loglevel = "OFF"
# Options: OFF, ERROR, WARNING, INFO, DEBUG
loglevel = "WARNING"
loglevel = "DEBUG"
log-dead-letters = off
log-dead-letters-during-shutdown = off
# Need to enable all logs in logback config
Expand Down
2 changes: 1 addition & 1 deletion benchmark/deploy/cfabcast-deploy.conf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 73,7 @@ akka {
# 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.
# default: 5
monitored-by-nr-of-members = 5
monitored-by-nr-of-members = 1

# After the heartbeat request has been sent the first failure detection
# will start after this period, even though no heartbeat message has
Expand Down
4 changes: 4 additions & 0 deletions src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 28,10 @@ akka {
"cfabcast.messages.CFABCastMessage" = cfabcaster
}

default-mailbox {
mailbox-type = "akka.dispatch.SingleConsumerOnlyUnboundedMailbox"
}

kryo {
# Possibles values for type are: graph or nograph
# graph supports serialization of object graphs with shared nodes
Expand Down
12 changes: 6 additions & 6 deletions src/main/scala/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 36,12 @@ object Main {

val system = ActorSystem("CFABCastSystem", config)
val node = system.actorOf(Props[Node], "node")
system.actorOf(ClusterSingletonManager.props(
singletonProps = Props[MembershipManager],
singletonName = "active",
terminationMessage = PoisonPill,
role = Some("cfabcast")),
name = "manager")
val singleton = system.actorOf(ClusterSingletonManager.props(
singletonProps = Props[MembershipManager],
singletonName = "active",
terminationMessage = PoisonPill,
role = Some("cfabcast")),
name = "manager")

//For test:
//FIXME not work with fork := true
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/cfabcast/MembershipManager.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 21,7 @@ import cfabcast.messages._

class MembershipManager extends Actor with ActorLogging {
import context.dispatcher

val cluster = Cluster(context.system)
val settings = Settings(context.system)
val waitFor = settings.MinNrOfNodes
Expand Down

0 comments on commit 3d1e0a6

Please sign in to comment.