lightbend / kalix-jvm-sdk

Java and Scala SDKs for Kalix
https://docs.kalix.io/java/index.html
Other
58 stars 39 forks source link

docs: CRDTs: register additional proto descriptors for use in sets/maps #768

Open raboof opened 2 years ago

raboof commented 2 years ago

When you want to use protobuf message types in CRDT Map or Set data structures, you have to register the corresponding descriptor in the additionalDescriptors by customizing the component registration (for which the defaults are generated under AkkaServerlessFactory. We should probably explain that in more detail in replicated-entity-crdt.md

johanandren commented 2 years ago

Could we detect and register those from the generated code instead?

raboof commented 2 years ago

at least for Map we don't necessarily specify the value type in the proto it seems (https://docs.akkaserverless.dev/java/replicated-entity-crdt.html#_replicated_map), indeed it might be fine to allow that and then add the descriptor automatically

johanandren commented 2 years ago

s/automatically/manually 👍