You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/04/29 00:40:18 UTC

[GitHub] [pulsar] jerrypeng edited a comment on issue #4127: [Issue#4110] [component/functions] Adding message as source or input of Function

jerrypeng edited a comment on issue #4127: [Issue#4110] [component/functions] Adding message as source or input of Function
URL: https://github.com/apache/pulsar/pull/4127#issuecomment-487429075
 
 
   @ConcurrencyPractitioner @sijie @srkukarni 
   
   Approaches I thought of:
   
   
   1. If we don't want to pull in pulsar-client-api and we want to the users to be able to get all of the properties of a Message<T>, then we will have to add the corresponding methods to the Record interface to expos all the properties.  
   
   Pros: pulsar-function-api do not need to depend on pulsar-client-api
   
   Cons: As @sijie mentioned before, we need properties/methods are add to Message<T>, we will also need to add them to the Record interface.  However, my biggest concern with this approach is that we already have methods like ``` getRecordSequence``` in the Record interface (which is different then the message sequence id though they return different forms of the same thing).  We will have to add another method getSequenceId to the Record interface which will be confusing.  Thus, I am not for this method
   
   2. We add an additional method to PulsarRecord i.e. ```public Message<T> getRawMessage()```.  Add an method to the Context interface i.e. ```pubic Message<T> getRawInputMessage```.  In the implementation of the method, we will just cast Record to PulsarRecord which is assumed for functions anyways.
   
   Pros: Simple addition
   
   Cons: pulsar-function-api need to depend on pulsar-client-api. Though this is not a deal breaker for me.
   
   
   
   
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services