Skip to content

Commit 6935dd8

Browse files
committed
Publication dispatcher
1 parent 260e6ec commit 6935dd8

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

persistence-model/src/main/scala/hmda/persistence/model/HmdaActor.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ trait HmdaActor extends Actor with ActorLogging {
66

77
override def preStart(): Unit = {
88
log.info(s"Actor started at ${self.path}")
9+
log.info("Thread name for actor: " + Thread.currentThread().getName)
910
}
1011

1112
override def postStop(): Unit = {

publication/src/main/resources/application.conf

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,22 +33,7 @@ akka {
3333

3434
}
3535

36-
publication-dispatcher {
37-
type = Dispatcher
38-
executor = "fork-join-executor"
39-
fork-join-executor {
40-
# Min number of threads to cap factor-based parallelism number to
41-
parallelism-min = 2
42-
# Parallelism (threads) ... ceil(available processors * factor)
43-
parallelism-factor = 2.0
44-
# Max number of threads to cap factor-based parallelism number to
45-
parallelism-max = 10
46-
}
47-
# Throughput defines the maximum number of messages to be
48-
# processed per actor before the thread jumps to the next actor.
49-
# Set to 1 for as fair as possible.
50-
throughput = 100
51-
}
36+
5237

5338
extensions = ["de.heikoseeberger.constructr.ConstructrExtension"]
5439

@@ -71,4 +56,21 @@ hmda {
7156
zookeeperHost = ${?ZOOKEEPER_HOST}
7257
zookeeperPort = 2181
7358
zookeeperPort = ${?ZOOKEEPER_PORT}
59+
}
60+
61+
publication-dispatcher {
62+
type = Dispatcher
63+
executor = "fork-join-executor"
64+
fork-join-executor {
65+
# Min number of threads to cap factor-based parallelism number to
66+
parallelism-min = 2
67+
# Parallelism (threads) ... ceil(available processors * factor)
68+
parallelism-factor = 2.0
69+
# Max number of threads to cap factor-based parallelism number to
70+
parallelism-max = 10
71+
}
72+
# Throughput defines the maximum number of messages to be
73+
# processed per actor before the thread jumps to the next actor.
74+
# Set to 1 for as fair as possible.
75+
throughput = 100
7476
}

publication/src/main/scala/hmda/publication/reports/AggregateAndDisclosureReports.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package hmda.publication.reports
22

3-
import akka.actor.{ Actor, ActorRef, ActorSystem, Props }
3+
import akka.actor.{ ActorRef, ActorSystem, Props }
44
import akka.stream.ActorMaterializer
5+
import hmda.persistence.model.HmdaActor
56
import hmda.publication.reports.disclosure.DisclosureReports
67

78
object AggregateAndDisclosureReports {
@@ -12,7 +13,7 @@ object AggregateAndDisclosureReports {
1213
}
1314
}
1415

15-
class AggregateAndDisclosureReports extends Actor {
16+
class AggregateAndDisclosureReports extends HmdaActor {
1617

1718
import AggregateAndDisclosureReports._
1819

0 commit comments

Comments
 (0)