pulsar-client-cpp
Producer.h
1 
19 #ifndef PRODUCER_HPP_
20 #define PRODUCER_HPP_
21 
22 #include <pulsar/ProducerConfiguration.h>
23 #include <boost/shared_ptr.hpp>
24 #include <stdint.h>
25 
26 #pragma GCC visibility push(default)
27 
28 namespace pulsar {
29 class ProducerImplBase;
30 class PulsarWrapper;
31 class PulsarFriend;
32 class Producer {
33  public:
37  Producer();
38 
42  const std::string& getTopic() const;
43 
60  Result send(const Message& msg);
61 
76  void sendAsync(const Message& msg, SendCallback callback);
77 
87  Result close();
88 
96  void closeAsync(CloseCallback callback);
97 
98  private:
99  typedef boost::shared_ptr<ProducerImplBase> ProducerImplBasePtr;
100  explicit Producer(ProducerImplBasePtr);
101 
102  friend class ClientImpl;
103  friend class PulsarFriend;
104  friend class PulsarWrapper;
105 
106  ProducerImplBasePtr impl_;
107 };
108 
109 }
110 
111 #pragma GCC visibility pop
112 
113 #endif /* PRODUCER_HPP_ */
Definition: Producer.h:32
Result send(const Message &msg)
Definition: Authentication.h:31
const std::string & getTopic() const
void closeAsync(CloseCallback callback)
Definition: Message.h:42
Result
Definition: Result.h:31
void sendAsync(const Message &msg, SendCallback callback)