codelipenghui opened a new pull request #2471: Pulsar Java Client Interceptors.
URL: https://github.com/apache/incubator-pulsar/pull/2471
 
 
   ### Motivation
   
   Support user to add interceptors to producer and consumer.
   
   ### Modifications
   
   Add Consumer interceptors.
   ```java
   Message<T> beforeConsume(Message<T> message);
   void onAcknowledge(MessageId messageId, Throwable cause);
   void onAcknowledgeCumulative(MessageId messageId, Throwable cause);
   ```
   Add Producer interceptors.
   ```java
   Message<T> beforeSend(Message<T> message);
   void onSendAcknowledgement(Message<T> message, MessageId msgId, Throwable 
cause);
   ```
   ### Result
   Users can using interceptors in multiple scenarios, such as for applications 
to add
   custom logging or processing.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to