pulsar-client-cpp
Loading...
Searching...
No Matches
MessageBatch.h
1
20#ifndef LIB_MESSAGE_BATCH_H
21#define LIB_MESSAGE_BATCH_H
22#include <pulsar/Message.h>
23#include <pulsar/defines.h>
24
25#include <vector>
26
27namespace pulsar {
28
29class PULSAR_PUBLIC MessageBatch {
30 public:
32
33 MessageBatch& withMessageId(const MessageId& messageId);
34
35 MessageBatch& parseFrom(const std::string& payload, uint32_t batchSize);
36
37 MessageBatch& parseFrom(const SharedBuffer& payload, uint32_t batchSize);
38
39 const std::vector<Message>& messages();
40
41 private:
42 typedef std::shared_ptr<MessageImpl> MessageImplPtr;
43 MessageImplPtr impl_;
44 Message batchMessage_;
45
46 std::vector<Message> batch_;
47};
48} // namespace pulsar
49#endif // LIB_MESSAGE_BATCH_H
Definition MessageBatch.h:29
Definition Message.h:44
Definition MessageId.h:34
Definition Authentication.h:31