RayRoestenburg / akka-in-action

Accompanying source code for akka in action
https://www.manning.com/books/akka-in-action
MIT License
750 stars 423 forks source link

After upgrading scala and akka, I wanted to submit the PR, but it had the side effect that the code in akka in action was inconsistent with the repository #99

Closed xinzhuxiansheng closed 1 year ago

xinzhuxiansheng commented 1 year ago

In the "chapter-remoting" module, I upgraded akka to 2.6.19, scala to 2.13.10, and scalatest to 3.2.12. The higher version of akka will make some adjustments to some conf, I can run the example after modification.

Modify example: Old:

akka {
  loglevel = DEBUG
  stdout-loglevel = WARNING
  loggers = ["akka.event.slf4j.Slf4jLogger"]

  actor {
    provider = "akka.remote.RemoteActorRefProvider"
  }

  remote {
    enabled-transports = ["akka.remote.netty.tcp"]
    netty.tcp {
      hostname = "0.0.0.0"
      port = 2551
    }
  }
}

New Content

akka {
  loglevel = DEBUG
  stdout-loglevel = DEBUG
  loggers = ["akka.event.slf4j.Slf4jLogger"]

  actor {
    provider = remote
    allow-java-serialization = on
  }

remote {
    use-unsafe-remote-features-outside-cluster = true
    artery {
      enabled = on
      transport = tcp
      canonical {
        hostname = "0.0.0.0"
        port = 2551
      }
      bind {
        hostname = "0.0.0.0"
        port = 2551
      }
    }
  }
}

This is just an example, but there are other places

So I thought I would submit pr to reduce the cost of learning for newcomers, but it would have the side effect that the code in akka in action would be inconsistent with the repository.

I want to hear your advice and look forward to your reply.

RayRoestenburg commented 1 year ago

Thanks for trying out the code with 2.6.19!

I would suggest newcomers start reading Akka In Action Second Edition instead, there is a github repo for it here: https://github.com/franciscolopezsancho/akka-topics . cc @franciscolopezsancho

xinzhuxiansheng commented 1 year ago

@RayRoestenburg Thank you for your advice , I'll close this issue in a moment。