eolivelli commented on issue #12087:
URL: https://github.com/apache/pulsar/issues/12087#issuecomment-927917443


   Regarding `default void cleanup() {}`
   
   The word 'cleanup' reads like something that is to be performed to "clean" 
after some operation or in the end.
   But if I understand correctly it is unrelated to any "convert" operation.
   
   I believe that we should pick a better name:
   1) afterConvert(EntryContext....) : if we want to call it after every 
"convert"
   2) close(): if we want to call it when shutting down the Consumer
   3) update(): if we want to call it sometimes, without any constraint
   
   I like 1) and 2) (we can do both), because from a developer perspective it 
is clear "when" the method is called.
   Option 3) does not guarantee that the method will be ever called, so it 
would be good only to update some metrics as in your example
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to