License key within Playframework

Hello there,

We are (finally) migrating to Akka 2.10+ in our web application backed by Playframework.

Unfortunately, we do have a strange behavior with the akka.license-key configuration.

We can give it via the JVM options; -Dakka.license-key. However, we do prefer using configuration files and environment variables.

Unfortunately, it seems that adding akka.license-key key into the configuration files does not work as expected: While we can read the key from the Play Configuration and his underlying typesafe Config, we do have the warning message when play start in dev mode:

WARN  a.a.ActorSystemImpl - Dev use only. Free keys at https://akka.io/key

However, we get a valid licenseKeyExpiry form the actor system.But, the system still stop after some times.

We do not create another actor system, we use the one from the Play AkkaComponents (via compile time DI).

Do you have any idea why did we get this message and how to fix it ?

Thanks

Okay, I guess nobody will support us for that case because it is due to the way Play work in dev mode.

When staging the whole system, everything works fine. So the issue is most probably due to the fact the dev mode allow hot reloading of code changes. I guess it play with different classpaths or fork the JVM. Which explain why the key is found in some case but not in others.

I’m going to discuss that issue with Playframework.

Hi

The actor system created in Play should use the same akka.* configurations without any prefixing, so I am not sure why it wouldn’t work for you. I’ll post your discussion in the Play github community for others to find, as you are correct that that is the best place to go for this one I think. Avoid "WARN a.a.ActorSystemImpl - Dev use only. Free keys at https://akka.io/key" for Akka in dev mode · playframework · Discussion #13142 · GitHub

Thanks,
Justin Pihony