19#ifndef PULSAR_CLIENT_HPP_
20#define PULSAR_CLIENT_HPP_
22#include <pulsar/ClientConfiguration.h>
23#include <pulsar/ConsoleLoggerFactory.h>
24#include <pulsar/Consumer.h>
25#include <pulsar/FileLoggerFactory.h>
26#include <pulsar/Message.h>
27#include <pulsar/MessageBuilder.h>
28#include <pulsar/Producer.h>
29#include <pulsar/Reader.h>
30#include <pulsar/Result.h>
31#include <pulsar/Schema.h>
32#include <pulsar/TableView.h>
33#include <pulsar/defines.h>
38typedef std::function<void(
Result, Producer)> CreateProducerCallback;
39typedef std::function<void(
Result, Consumer)> SubscribeCallback;
40typedef std::function<void(
Result, Reader)> ReaderCallback;
41typedef std::function<void(
Result, TableView)> TableViewCallback;
42typedef std::function<void(
Result,
const std::vector<std::string>&)> GetPartitionsCallback;
43typedef std::function<void(
Result)> CloseCallback;
58 Client(
const std::string& serviceUrl);
114 CreateProducerCallback callback);
146 void subscribeAsync(
const std::string& topic,
const std::string& subscriptionName,
147 SubscribeCallback callback);
159 void subscribeAsync(
const std::string& topic,
const std::string& subscriptionName,
169 Result subscribe(
const std::vector<std::string>& topics,
const std::string& subscriptionName,
180 Result subscribe(
const std::vector<std::string>& topics,
const std::string& subscriptionName,
193 void subscribeAsync(
const std::vector<std::string>& topics,
const std::string& subscriptionName,
194 SubscribeCallback callback);
206 void subscribeAsync(
const std::vector<std::string>& topics,
const std::string& subscriptionName,
230 SubscribeCallback callback);
334 TableViewCallback callBack);
419 bool poolConnections);
420 Client(
const std::shared_ptr<ClientImpl>);
422 friend class PulsarFriend;
423 friend class PulsarWrapper;
424 std::shared_ptr<ClientImpl> impl_;
Definition ClientConfiguration.h:29
Result subscribeWithRegex(const std::string ®exPattern, const std::string &subscriptionName, Consumer &consumer)
Result subscribeWithRegex(const std::string ®exPattern, const std::string &subscriptionName, const ConsumerConfiguration &conf, Consumer &consumer)
uint64_t getNumberOfConsumers()
Get the number of alive consumers on the current client.
Result subscribe(const std::string &topic, const std::string &subscriptionName, const ConsumerConfiguration &conf, Consumer &consumer)
Client(const std::string &serviceUrl, const ClientConfiguration &clientConfiguration)
Result getPartitionsForTopic(const std::string &topic, std::vector< std::string > &partitions)
void getPartitionsForTopicAsync(const std::string &topic, GetPartitionsCallback callback)
void subscribeAsync(const std::vector< std::string > &topics, const std::string &subscriptionName, SubscribeCallback callback)
void createProducerAsync(const std::string &topic, ProducerConfiguration conf, CreateProducerCallback callback)
void subscribeWithRegexAsync(const std::string ®exPattern, const std::string &subscriptionName, SubscribeCallback callback)
uint64_t getNumberOfProducers()
Get the number of alive producers on the current client.
void subscribeAsync(const std::string &topic, const std::string &subscriptionName, SubscribeCallback callback)
void createProducerAsync(const std::string &topic, CreateProducerCallback callback)
void subscribeAsync(const std::string &topic, const std::string &subscriptionName, const ConsumerConfiguration &conf, SubscribeCallback callback)
Result subscribe(const std::vector< std::string > &topics, const std::string &subscriptionName, const ConsumerConfiguration &conf, Consumer &consumer)
Result createProducer(const std::string &topic, Producer &producer)
Result subscribe(const std::string &topic, const std::string &subscriptionName, Consumer &consumer)
void getSchemaInfoAsync(const std::string &topic, int64_t version, std::function< void(Result, const SchemaInfo &)> callback)
Result createProducer(const std::string &topic, const ProducerConfiguration &conf, Producer &producer)
Result createTableView(const std::string &topic, const TableViewConfiguration &conf, TableView &tableView)
void createReaderAsync(const std::string &topic, const MessageId &startMessageId, const ReaderConfiguration &conf, ReaderCallback callback)
void subscribeWithRegexAsync(const std::string ®exPattern, const std::string &subscriptionName, const ConsumerConfiguration &conf, SubscribeCallback callback)
Client(const std::string &serviceUrl)
void closeAsync(CloseCallback callback)
Result createReader(const std::string &topic, const MessageId &startMessageId, const ReaderConfiguration &conf, Reader &reader)
void createTableViewAsync(const std::string &topic, const TableViewConfiguration &conf, TableViewCallback callBack)
Result subscribe(const std::vector< std::string > &topics, const std::string &subscriptionName, Consumer &consumer)
void subscribeAsync(const std::vector< std::string > &topics, const std::string &subscriptionName, const ConsumerConfiguration &conf, SubscribeCallback callback)
Definition ConsumerConfiguration.h:65
Definition MessageId.h:34
Definition ProducerConfiguration.h:45
Definition ReaderConfiguration.h:49
Definition TableView.h:38
Definition Authentication.h:31
Result
Definition Result.h:32
Definition TableViewConfiguration.h:27