Closed ta7uw closed 1 year ago
Yeah, if we want to specify the partition based on its task value by custom partitioner, it needs such redundant works.
Providing an overload for specifying partition explicitly sounds make sense.
Thanks for your reply. I'll work on this feature.
We can inject a custom
org.apache.kafka.clients.producer.Partitioner
by implementing it and passing it throughDecatonClientBuilder#producerConfig
.However, A decaton client wraps a task set by our application in
DecatonTaskRequest
. So, to determine a partition based on a task inPartitioner
, we should handle aDecatonTaskRequest
(deserialize our defined task. after that proceed partition step) like the following.The above seems redundant and Inefficient due to deserializing a serialized task.
Could we provide a way of specifying a partition in producing a task like the following API?
The partition that is passed as the argument would be set to
TaskMetadataProto
and be used in an internalPartitioner
that determines a partition base on it.What do you think about this feature?