Hi, TD and other streaming developers,
When I look at the implementation of actor-based receiver
(ActorReceiver.scala), I found that there are several messages which are not
mentioned in the document
case props: Props =>
val worker = context.actorOf(props)
logInfo("Started receiver worker at:" + worker.path)
sender ! worker
case (props: Props, name: String) =>
val worker = context.actorOf(props, name)
logInfo("Started receiver worker at:" + worker.path)
sender ! worker
case _: PossiblyHarmful => hiccups.incrementAndGet()
case _: Statistics =>
val workers = context.children
sender ! Statistics(n.get, workers.size, hiccups.get, workers.mkString("\n”))
Is it hided with intention or incomplete document, or I missed something?
And the handler of these messages are “buggy"? e.g. when we start a new worker,
we didn’t increase n (counter of children), and n and hiccups are unnecessarily
set to AtomicInteger ?
Best,
--
Nan Zhu
http://codingcat.me