有没有办法分解消息,以便只使用最新的消息?
我试图将消息保存在列表中,但没有成功
var consumer = new Consumer(new ConsumerOptions(topic, router));
foreach (var message in consumer.Consume())
{
Console.WriteLine(Encoding.UTF8.GetString(message.Value));
}
输出应为:1、2、3、4
输出为:1、1、2、1、2、3、1、2、3、4
湖上湖
鸿蒙传说
相关分类