microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
13 stars 7 forks source link

Provide a way for customer to inject their own data converter. #145

Open kaibocai opened 1 year ago

kaibocai commented 1 year ago

Issue describing the changes in this PR

Try to improve https://github.com/microsoft/durabletask-java/issues/134. This PR provides the customer a way to provide their own data converter through java SPI. To have it work on java11 and above, the dependent PR https://github.com/Azure/azure-functions-java-worker/pull/717 has to be released in java worker.

Have to do more tests on this PR. Will try to provide more details once the PR is ready. Tested on local worked as expected.

Right now for the issue mentioned in https://github.com/microsoft/durabletask-java/issues/134, using my customized data converter based on gson works fine

The end2end test failed because the java worker is not released yet, this feature shall wait for the PR at https://github.com/Azure/azure-functions-java-worker/pull/717/files to be released first. Once the image here https://github.com/microsoft/durabletask-java/blob/57133bdee6717b11186cc84d7cf849a44d48d6a5/samples-azure-functions/Dockerfile#L1 include above java worker PR then the end2end test should pass.

image

cc @nicktombeur

Pull request checklist

Additional information

Additional PR information