pulsar-client-cpp
Loading...
Searching...
No Matches
ConsumerInterceptor.h
1
20#ifndef PULSAR_CPP_CONSUMER_INTERCEPTOR_H
21#define PULSAR_CPP_CONSUMER_INTERCEPTOR_H
22
23#include <pulsar/Message.h>
24#include <pulsar/Result.h>
25#include <pulsar/defines.h>
26
27#include <set>
28
29namespace pulsar {
30
31class Consumer;
32
43class PULSAR_PUBLIC ConsumerInterceptor {
44 public:
45 virtual ~ConsumerInterceptor() {}
49 virtual void close() {}
50
80 virtual Message beforeConsume(const Consumer& consumer, const Message& message) = 0;
81
92 virtual void onAcknowledge(const Consumer& consumer, Result result, const MessageId& messageID) = 0;
93
104 virtual void onAcknowledgeCumulative(const Consumer& consumer, Result result,
105 const MessageId& messageID) = 0;
106
115 virtual void onNegativeAcksSend(const Consumer& consumer, const std::set<MessageId>& messageIds) = 0;
116};
117
118typedef std::shared_ptr<ConsumerInterceptor> ConsumerInterceptorPtr;
119} // namespace pulsar
120
121#endif // PULSAR_CPP_CONSUMER_INTERCEPTOR_H
Definition Consumer.h:37
Definition ConsumerInterceptor.h:43
virtual Message beforeConsume(const Consumer &consumer, const Message &message)=0
virtual void onNegativeAcksSend(const Consumer &consumer, const std::set< MessageId > &messageIds)=0
virtual void onAcknowledge(const Consumer &consumer, Result result, const MessageId &messageID)=0
virtual void onAcknowledgeCumulative(const Consumer &consumer, Result result, const MessageId &messageID)=0
virtual void close()
Definition ConsumerInterceptor.h:49
Definition Message.h:44
Definition MessageId.h:34
Definition Authentication.h:31
Result
Definition Result.h:32