Consume Multiple Messages at once
See original GitHub issueIs it possible to do something like this in Confluent .NET API?
public void run() {
try {
consumer.subscribe(topics);
while (!shutdown.get()) {
ConsumerRecords<K, V> records = consumer.poll(500);
records.forEach(record -> process(record));
}
} finally {
consumer.close();
shutdownLatch.countDown();
}
}
This is taken from Java Documentation from docs.confluent.io.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Consume multiple messages at a time - python
The advantage here is that you can fetch five messages on five different threads and combine the data if needed.
Read more >Consume multiple messages · Issue #1164
The API provides you messages one at a time, but this is from an internal queue on the client, and behind the scenes...
Read more >[rabbitmq-discuss] Consuming multiple messages at a time
Hi, We have an application where in for each client we create a Queue in RabbitMQ. (i.e. we create a binding with client...
Read more >Subscriber vs Consume - Process Multiple Messages
Once the number of messages in a queue is obtained you can create a for each loop and iterate until the no of...
Read more >Consume multiple messages from RabbitMQ in CAI - HOW TO
To increase the performance and to consume more messages at a time, do the following: Open the "RabbitMQ connection" and go to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
sorry for the terseness, was on my phone.
the consumer delivers messages to your application from a cache - behind the scenes messages are retrieved from brokers in batches. There might be a slight improvement to be had by returning batches to the application because of reduced marshaling overhead between librdkafka and the C# layer, but I doubt it is very much. The consume benchmark (in the tests folder) can do about 1M msg/s on my machine (has comparable performance to the java consumer).
it’s quite a lot of effort to build this and v. unlikely we’ll ever do it as we view this as an inferior API