sijie commented on issue #4093: [issue#4042] improve java functions API
URL: https://github.com/apache/pulsar/pull/4093#issuecomment-485075756
 
 
   It doesn’t break the abstraction. The context.publish was designed for 
function users publishing messages inside a function. There is no difference 
between you are using context publish, or a message builder. The current 
publish method introduces a lot of overrided methods which make context 
interface messy. We can’t keep adding new overridden methods when a new feature 
comes in. 
   
   Returning a message builder doesn’t mean you are bypassing function 
frameworks. You can return a builder implementation which wraps the builder 
returned by the client. So when sendAsync was called metrics are updated  
correctly.
   
   I strongly believe message builder is the right approach. I would also 
strongly disagree adding any other customized builder or any overridden method 
which makes function api become messy.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to