22 #include <pulsar/ProducerConfiguration.h>
23 #include <pulsar/defines.h>
29 class ProducerImplBase;
33 typedef std::function<void(
Result)> FlushCallback;
34 typedef std::shared_ptr<ProducerImplBase> ProducerImplBasePtr;
46 const std::string& getTopic()
const;
51 const std::string& getProducerName()
const;
100 void sendAsync(
const Message& msg, SendCallback callback);
112 void flushAsync(FlushCallback callback);
126 int64_t getLastSequenceId()
const;
136 const std::string& getSchemaVersion()
const;
156 void closeAsync(CloseCallback callback);
161 bool isConnected()
const;
164 explicit Producer(ProducerImplBasePtr);
166 friend class ClientImpl;
167 friend class PulsarFriend;
168 friend class PulsarWrapper;
169 friend class ProducerImpl;
171 ProducerImplBasePtr impl_;
174 void producerFailMessages(
Result result);