【问题标题】:When reading multiple topics in kafka how can I tell the topic of a specific message?在 kafka 中阅读多个主题时,如何分辨特定消息的主题?
【发布时间】:2021-09-03 21:05:26
【问题描述】:

我正在使用 C# 并拥有以下内容:

consumer.Subscribe( new string[] {"topic1", "topic2"});
var cr = consumer.Consume();
console.Write($"key {cr.Message.Key}\r\nvalue {cr.Message.Value}");

当我收听多个主题时,如何获取特定消息的主题?

【问题讨论】:

  • 感谢您的意见。我在 cr.Message 下寻找它。是cr.Topic。

标签: c# apache-kafka consumer


【解决方案1】:
猜你喜欢
  • 2020-06-24
  • 1970-01-01
  • 1970-01-01
  • 2019-10-09
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多