Skip to content

Commit 0ffb70f

Browse files
committed
Add type alias to create multiple topics
1 parent 6fd98bb commit 0ffb70f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/cppkafka/admin/create_topic_operation.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <string>
3636
#include <vector>
3737
#include "operation.h"
38+
#include "compound_operation.h"
3839
#include "../configuration_option.h"
3940

4041
#if RD_KAFKA_VERSION >= RD_KAFKA_ADMIN_API_SUPPORT_VERSION
@@ -44,6 +45,11 @@ namespace admin {
4445

4546
class CreateTopicOperation : public Operation {
4647
public:
48+
/**
49+
* The rdkafka type used for this operation's handle
50+
*/
51+
using HandleType = rd_kafka_NewTopic_t;
52+
4753
/**
4854
* \brief Constructs an instance of a CreateTopicOperation
4955
*
@@ -112,6 +118,12 @@ class CreateTopicOperation : public Operation {
112118
HandlePtr handle_;
113119
};
114120

121+
/**
122+
* \brief Creates several topics
123+
*/
124+
using CreateTopicsOperation = CompoundOperation<CreateTopicOperation,
125+
&rd_kafka_CreateTopics>;
126+
115127
} // admin
116128
} // cppkafka
117129

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy