Skip to content

Commit

Permalink
[OMON-406] Add batch size and group id to Pull example (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
awegrzyn authored Jan 25, 2023
1 parent 89d4273 commit 83ddef5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/13-PullClient.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ int main()
/// List of topics to subscribe
std::vector<std::string> topics = {"cru.link_status"};
/// Connect to server
auto client = MonitoringFactory::GetPullClient("adam-kafka:9092", topics);
auto client = MonitoringFactory::GetPullClient("adam-kafka:9092", topics, "link-status-consumer");
for (;;) {
auto metrics = client->pull();
if (!metrics.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Transports/KafkaConsumer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ KafkaConsumer::KafkaConsumer(const std::string& url, const std::vector<std::stri
std::vector<std::pair<std::string, std::string>> KafkaConsumer::pull()
{
std::vector<std::pair<std::string, std::string>> received;
size_t batch_size = 5;
size_t batch_size = 10;
int remaining_timeout = 1000;
auto start = std::chrono::high_resolution_clock::now();

Expand Down

0 comments on commit 83ddef5

Please sign in to comment.