Is there a way to decompose the messages so that only the latest message is consumed?
I tried to save the messages in a list, but it didn't really work out
var consumer = new Consumer(new ConsumerOptions(topic, router));
foreach (var message in consumer.Consume())
{
Console.WriteLine(Encoding.UTF8.GetString(message.Value));
}
Output should be: 1, 2, 3, 4
Output is: 1, 1, 2, 1, 2, 3, 1, 2, 3, 4