I do have a .Net code that I'm using in a windows service that has the process of initializing a consumer object and consuming the Kafka.
var config = new ProducerConfig
{
BootstrapServers = "host1:9092,host2:9092,...",
ClientId = ...,
...
};
ConsumerBuilder<byte[], byte[]> c = new ConsumerBuilder<byte[], byte[]>(config ).SetErrorHandler(_Consumer_OnError);
consumer = c.Build();
consumer.Subscribe(topics);
while (!canceled)
{
var consumeResult = consumer.Consume(cancellationToken);
//handle consumed message.
...
}
I want to know that what will happen after all the messages are consumed from the partition. FYI: There are 3 partitions and 4 nodes for consuming the information.