Confluent-kafka-dotnet: Kafka Consumer

Created on 6 Aug 2019  路  1Comment  路  Source: confluentinc/confluent-kafka-dotnet

Description

Hi,

I am trying to kafka consumer to read from specific offset and multiple partitions and commit the values once read.

But, i did'nt find any api to send multiple partitions and offset.

Thanks,

How to reproduce

Checklist

Please provide the following information:

  • [x] A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file.
  • [ ] Confluent.Kafka nuget version.
  • [ ] Apache Kafka version.
  • [ ] Client configuration.
  • [ ] Operating system.
  • [ ] Provide logs (with "debug" : "..." as necessary in configuration).
  • [ ] Provide broker log excerpts.
  • [ ] Critical issue.
question

Most helpful comment

to assign to multiple partitions manually (specifying start offsets): https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/IConsumer.cs#L225

if you're using consumer groups, you can specify specific start offsets explicitly by returning a collection from the partitions assigned handler: https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/ConsumerBuilder.cs#L236

you can commit offsets for multiple topics simultaneously using:
https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/IConsumer.cs#L339

>All comments

to assign to multiple partitions manually (specifying start offsets): https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/IConsumer.cs#L225

if you're using consumer groups, you can specify specific start offsets explicitly by returning a collection from the partitions assigned handler: https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/ConsumerBuilder.cs#L236

you can commit offsets for multiple topics simultaneously using:
https://github.com/confluentinc/confluent-kafka-dotnet/blob/master/src/Confluent.Kafka/IConsumer.cs#L339

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Duorman picture Duorman  路  3Comments

farodin91 picture farodin91  路  3Comments

MihaiComan87 picture MihaiComan87  路  3Comments

ThomasHjorslevFcn picture ThomasHjorslevFcn  路  3Comments

nitinpi picture nitinpi  路  4Comments