pulsar-client-cpp
include
pulsar
ProducerInterceptor.h
1
20
#ifndef PULSAR_PRODUCER_INTERCEPTOR_H
21
#define PULSAR_PRODUCER_INTERCEPTOR_H
22
23
#include <pulsar/Message.h>
24
#include <pulsar/Result.h>
25
#include <pulsar/defines.h>
26
27
namespace
pulsar
{
28
29
class
Producer;
30
42
class
PULSAR_PUBLIC
ProducerInterceptor
{
43
public
:
44
virtual
~
ProducerInterceptor
() {}
45
49
virtual
void
close
() {}
50
80
virtual
Message
beforeSend(
const
Producer
& producer,
const
Message
& message) = 0;
81
99
virtual
void
onSendAcknowledgement(
const
Producer
& producer,
Result
result,
const
Message
& message,
100
const
MessageId
& messageID) = 0;
101
108
virtual
void
onPartitionsChange
(
const
std::string& topicName,
int
partitions) {}
109
};
110
111
typedef
std::shared_ptr<ProducerInterceptor> ProducerInterceptorPtr;
112
}
// namespace pulsar
113
114
#endif // PULSAR_PRODUCER_INTERCEPTOR_H
pulsar::MessageId
Definition:
MessageId.h:34
pulsar::ProducerInterceptor::close
virtual void close()
Definition:
ProducerInterceptor.h:49
pulsar::Result
Result
Definition:
Result.h:31
pulsar::ProducerInterceptor
Definition:
ProducerInterceptor.h:42
pulsar::Message
Definition:
Message.h:43
pulsar::ProducerInterceptor::onPartitionsChange
virtual void onPartitionsChange(const std::string &topicName, int partitions)
Definition:
ProducerInterceptor.h:108
pulsar
Definition:
Authentication.h:31
pulsar::Producer
Definition:
Producer.h:36
Generated by
1.8.17