Added timeout overloads for consumer and handle classes

This commit is contained in:
Docker RHEL
2020-04-08 15:23:05 +00:00
parent 2ce0ae4a62
commit b2b0d16fee
4 changed files with 152 additions and 17 deletions

View File

@@ -280,6 +280,20 @@ public:
* \return The topic partition list
*/
TopicPartitionList get_offsets_committed(const TopicPartitionList& topic_partitions) const;
/**
* \brief Gets the offsets committed for the given topic/partition list with a timeout
*
* This translates into a call to rd_kafka_committed
*
* \param topic_partitions The topic/partition list to be queried
*
* \param timeout The timeout for this operation. Supersedes the default consumer timeout.
*
* \return The topic partition list
*/
TopicPartitionList get_offsets_committed(const TopicPartitionList& topic_partitions,
std::chrono::milliseconds timeout) const;
/**
* \brief Gets the offset positions for the given topic/partition list