Rebased pull 16537

https://github.com/akka/akka/pull/16537