Also, there is a couple of things that should be noted. @vvcephei  In your 
code, it appears that you added a ```Map```  to allow us to tell which 
```TaskId``` matches with what ```TaskMetadata```. But such an approach could 
be difficult to maintain because ```TaskId``` occurs several times as fields 
throughout the code. Therefore, each time ```TaskId``` occurs as a field, some 
change to the current fields or adding a new field would be required to 
accomadate for that. In contrast, inheritance allows us to naturally embed the 
metadata into the existing fields. Inheritance would allow further upgrades in 
the future easier, meanwhile, the scattered manner in which you keep tabs on 
```TaskMetadata``` would be harder to keep track of (your way might also have 
heavier memory consumption i.e. you are adding a new Map field to keep track of 
the data).  

[ Full content available at: https://github.com/apache/kafka/pull/5012 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to