Skip to content

Commit 83ddef5

Browse files
authored
[OMON-406] Add batch size and group id to Pull example (#313)
1 parent 89d4273 commit 83ddef5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/13-PullClient.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int main()
1212
/// List of topics to subscribe
1313
std::vector<std::string> topics = {"cru.link_status"};
1414
/// Connect to server
15-
auto client = MonitoringFactory::GetPullClient("adam-kafka:9092", topics);
15+
auto client = MonitoringFactory::GetPullClient("adam-kafka:9092", topics, "link-status-consumer");
1616
for (;;) {
1717
auto metrics = client->pull();
1818
if (!metrics.empty()) {

src/Transports/KafkaConsumer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ KafkaConsumer::KafkaConsumer(const std::string& url, const std::vector<std::stri
5454
std::vector<std::pair<std::string, std::string>> KafkaConsumer::pull()
5555
{
5656
std::vector<std::pair<std::string, std::string>> received;
57-
size_t batch_size = 5;
57+
size_t batch_size = 10;
5858
int remaining_timeout = 1000;
5959
auto start = std::chrono::high_resolution_clock::now();
6060

0 commit comments

Comments
 (0)