I’m trying to use a java library for distributed background job processing called JobRunr (https://www.jobrunr.io/en/) from Kotlin.
JobRunr works by serializing a lambda containing the code that you want to run in your background job into a database (eg. Redis), where other servers running JobRunr can pick up the lambda, deserialize it and execute it.
JobRunr achieves this with a SAM (Functional) interface, that implements serializable.
It seems that Kotlin does not compile serializable SAM lambdas in the same way as Java does and that causes problems.
Here is the link to an issue I opened on JobRunr’s GitHub about the same problem: https://github.com/jobrunr/jobrunr/issues/63.
Does this issue have a quick and dirty workaround, or do I need to open a YouTrack ticket for this?