|
| | Client (const std::string &serviceUrl) |
| |
| | Client (const std::string &serviceUrl, const ClientConfiguration &clientConfiguration) |
| |
| Result | createProducer (const std::string &topic, Producer &producer) |
| |
| Result | createProducer (const std::string &topic, const ProducerConfiguration &conf, Producer &producer) |
| |
|
void | createProducerAsync (const std::string &topic, CreateProducerCallback callback) |
| |
|
void | createProducerAsync (const std::string &topic, ProducerConfiguration conf, CreateProducerCallback callback) |
| |
|
Result | subscribe (const std::string &topic, const std::string &consumerName, Consumer &consumer) |
| |
|
Result | subscribe (const std::string &topic, const std::string &consumerName, const ConsumerConfiguration &conf, Consumer &consumer) |
| |
|
void | subscribeAsync (const std::string &topic, const std::string &consumerName, SubscribeCallback callback) |
| |
|
void | subscribeAsync (const std::string &topic, const std::string &consumerName, const ConsumerConfiguration &conf, SubscribeCallback callback) |
| |
| Result | subscribe (const std::vector< std::string > &topics, const std::string &subscriptionName, Consumer &consumer) |
| |
|
Result | subscribe (const std::vector< std::string > &topics, const std::string &subscriptionName, const ConsumerConfiguration &conf, Consumer &consumer) |
| |
|
void | subscribeAsync (const std::vector< std::string > &topics, const std::string &subscriptionName, SubscribeCallback callback) |
| |
|
void | subscribeAsync (const std::vector< std::string > &topics, const std::string &subscriptionName, const ConsumerConfiguration &conf, SubscribeCallback callback) |
| |
| Result | subscribeWithRegex (const std::string ®exPattern, const std::string &consumerName, Consumer &consumer) |
| |
|
Result | subscribeWithRegex (const std::string ®exPattern, const std::string &consumerName, const ConsumerConfiguration &conf, Consumer &consumer) |
| |
|
void | subscribeWithRegexAsync (const std::string ®exPattern, const std::string &consumerName, SubscribeCallback callback) |
| |
|
void | subscribeWithRegexAsync (const std::string ®exPattern, const std::string &consumerName, const ConsumerConfiguration &conf, SubscribeCallback callback) |
| |
| Result | createReader (const std::string &topic, const MessageId &startMessageId, const ReaderConfiguration &conf, Reader &reader) |
| |
|
void | createReaderAsync (const std::string &topic, const MessageId &startMessageId, const ReaderConfiguration &conf, ReaderCallback callback) |
| |
| Result | getPartitionsForTopic (const std::string &topic, std::vector< std::string > &partitions) |
| |
| void | getPartitionsForTopicAsync (const std::string &topic, GetPartitionsCallback callback) |
| |
| Result | close () |
| |
|
void | closeAsync (CloseCallback callback) |
| |
|
void | shutdown () |
| |
Create a topic reader with given
for reading messages from the specified topic.
The Reader provides a low-level abstraction that allows for manual positioning in the topic, without using a subscription. Reader can only work on non-partitioned topics.
The initial reader positioning is done by specifying a message id. The options are:
-
MessageId.earliest : Start reading from the earliest message available in the topic
-
MessageId.latest : Start reading from the end topic, only getting messages published after the reader was created
-
MessageId : When passing a particular message id, the reader will position itself on that specific position. The first message to be read will be the message next to the specified messageId.
- Parameters
-
| topic | The name of the topic where to read |
| startMessageId | The message id where the reader will position itself. The first message returned will be the one after the specified startMessageId |
| conf | The object |
- Returns
- The object
| Result pulsar::Client::getPartitionsForTopic |
( |
const std::string & |
topic, |
|
|
std::vector< std::string > & |
partitions |
|
) |
| |
Get the list of partitions for a given topic.
If the topic is partitioned, this will return a list of partition names. If the topic is not partitioned, the returned list will contain the topic name itself.
This can be used to discover the partitions and create Reader, Consumer or Producer instances directly on a particular partition.
- Parameters
-
- Since
- 2.3.0
| void pulsar::Client::getPartitionsForTopicAsync |
( |
const std::string & |
topic, |
|
|
GetPartitionsCallback |
callback |
|
) |
| |
Get the list of partitions for a given topic in asynchronous mode.
If the topic is partitioned, this will return a list of partition names. If the topic is not partitioned, the returned list will contain the topic name itself.
This can be used to discover the partitions and create Reader, Consumer or Producer instances directly on a particular partition.
- Parameters
-
| topic | the topic name |
| callback | the callback that will be invoked when the list of partitions is available |
- Since
- 2.3.0