22#include <pulsar/BrokerConsumerStats.h>
23#include <pulsar/ConsumerConfiguration.h>
24#include <pulsar/TypedMessage.h>
25#include <pulsar/defines.h>
31class ConsumerImplBase;
33typedef std::shared_ptr<ConsumerImplBase> ConsumerImplBasePtr;
100 template <
typename T>
103 auto result = receive(rawMsg);
118 template <
typename T>
121 auto result = receive(rawMsg, timeoutMs);
139 template <
typename T>
141 typename TypedMessage<T>::Decoder decoder) {
142 receiveAsync([callback, decoder](
Result result,
const Message& msg) {
475 ConsumerImplBasePtr impl_;
476 explicit Consumer(ConsumerImplBasePtr);
478 friend class PulsarFriend;
479 friend class PulsarWrapper;
480 friend class MultiTopicsConsumerImpl;
481 friend class ConsumerImpl;
482 friend class ClientImpl;
483 friend class ConsumerTest;
Definition BrokerConsumerStats.h:35
virtual void seekAsync(uint64_t timestamp, ResultCallback callback)
void receiveAsync(ReceiveCallback callback)
void getBrokerConsumerStatsAsync(BrokerConsumerStatsCallback callback)
Result resumeMessageListener()
void closeAsync(ResultCallback callback)
void acknowledgeAsync(const MessageId &messageId, ResultCallback callback)
Result acknowledge(const Message &message)
void negativeAcknowledge(const Message &message)
void redeliverUnacknowledgedMessages()
Result acknowledgeCumulative(const Message &message)
Result seek(const MessageId &messageId)
Result batchReceive(Messages &msgs)
Result acknowledge(const MessageIdList &messageIdList)
void acknowledgeCumulativeAsync(const MessageId &messageId, ResultCallback callback)
Result getBrokerConsumerStats(BrokerConsumerStats &brokerConsumerStats)
void acknowledgeCumulativeAsync(const Message &message, ResultCallback callback)
Result pauseMessageListener()
void acknowledgeAsync(const MessageIdList &messageIdList, ResultCallback callback)
Result acknowledgeCumulative(const MessageId &messageId)
const std::string & getConsumerName() const
void acknowledgeAsync(const Message &message, ResultCallback callback)
void unsubscribeAsync(ResultCallback callback)
Result receive(Message &msg)
void batchReceiveAsync(BatchReceiveCallback callback)
Result receive(Message &msg, int timeoutMs)
const std::string & getTopic() const
Result seek(uint64_t timestamp)
Result acknowledge(const MessageId &messageId)
virtual void seekAsync(const MessageId &messageId, ResultCallback callback)
const std::string & getSubscriptionName() const
Result getLastMessageId(MessageId &messageId)
void getLastMessageIdAsync(GetLastMessageIdCallback callback)
void negativeAcknowledge(const MessageId &messageId)
Definition MessageId.h:34
Definition TypedMessage.h:28
Definition Authentication.h:31
std::vector< Message > Messages
Callback definition for non-data operation.
Definition ConsumerConfiguration.h:49
std::function< void(Result result)> ResultCallback
Callback definition for non-data operation.
Definition ConsumerConfiguration.h:50
Result
Definition Result.h:32