in pekko-sample-kafka-to-sharding-scala/processor/src/main/scala/sample/sharding/kafka/Main.scala [22:36]
def main(args: Array[String]): Unit = {
def isInt(s: String): Boolean = s.matches("""\d+""")
args.toList match {
case single :: Nil if isInt(single) =>
val nr = single.toInt
init(2550 + nr, 8550 + nr, 8080 + nr)
case portString :: managementPort :: frontEndPort :: Nil
if isInt(portString) && isInt(managementPort) && isInt(frontEndPort) =>
init(portString.toInt, managementPort.toInt, frontEndPort.toInt)
case _ =>
throw new IllegalArgumentException("usage: <remotingPort> <managementPort> <frontEndPort>")
}
}