Is your feature request related to a problem? Please describe.
The problem is our requirement to set the Kafka partition key to be the group/stream id without manually doing this for every message type. We currently solve this problem by inspecting all message types that are configured for Kafka publishing during bootstrapping. We check that they all have a string Id property, and then when returning a cascaded message we pass all message objects through a class that has a map of "valid publishable message types" and extract the Id property value, and set it as the partition key.
Describe the solution you'd like
It would be great if we could bin this code and have a Wolverine config option to automatically assign the group/stream id to be the Kafka partition key. We don't have marker interfaces on our message types since we auto-gen them from .proto files.
Describe alternatives you've considered
We have a working alternative as described but would be delighted with a more elegant inbuilt solution.
Is your feature request related to a problem? Please describe.
The problem is our requirement to set the Kafka partition key to be the group/stream id without manually doing this for every message type. We currently solve this problem by inspecting all message types that are configured for Kafka publishing during bootstrapping. We check that they all have a
string Idproperty, and then when returning a cascaded message we pass all message objects through a class that has a map of "valid publishable message types" and extract the Id property value, and set it as the partition key.Describe the solution you'd like
It would be great if we could bin this code and have a Wolverine config option to automatically assign the group/stream id to be the Kafka partition key. We don't have marker interfaces on our message types since we auto-gen them from .proto files.
Describe alternatives you've considered
We have a working alternative as described but would be delighted with a more elegant inbuilt solution.