【问题标题】:ProduceResponse from confluent cloud broker using confluent-kafka-python使用 confluent-kafka-python 来自融合云代理的 ProduceResponse
【发布时间】:2021-10-03 23:59:06
【问题描述】:

此日志可通过confluent-kafka-pythonconfluent cloud 的生产者客户端中的debug=all 配置获得。

如何将ProduceResponse 解析为rtt?可以使用on_delivery回调来完成吗?

|RECV|rdkafka#producer-1| [thrd:sasl_ssl://b4-confluent-cloud-broker:9092/4]: sasl_ssl://b4-confluent-cloud-broker:9092/4: Received ProduceResponse (v7, 62 bytes, CorrId 31, rtt 323.28ms)

【问题讨论】:

    标签: apache-kafka kafka-producer-api librdkafka confluent-cloud confluent-kafka-python


    【解决方案1】:

    传递报告回调中的Message 对象有一个latency() 方法,该方法返回从produce() 到代理确认的总时间。

    【讨论】:

      猜你喜欢
      • 2017-02-17
      • 2019-01-24
      • 2021-09-12
      • 1970-01-01
      • 2021-07-09
      • 1970-01-01
      • 2021-11-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多