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 2018/08/29 08:50:36 UTC
[GitHub] codelipenghui opened a new pull request #2471: Pulsar Java Client
Interceptors.
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:
users@infra.apache.org
With regards,
Apache Git Services