【问题标题】:unable to send large files to Kafka broker | Error message: The request included a message larger than the max message size the server will accept无法将大文件发送到 Kafka 代理 |错误消息:请求包含的消息大于服务器将接受的最大消息大小
【发布时间】:2020-05-11 13:41:07
【问题描述】:

我无法向代理发送大文件,我已经编辑了配置文件并在我的客户端程序中,但它不起作用。

  • 错误信息

    请求包含的消息大于服务器将接受的最大消息大小。

  • 服务器属性

    message.max.bytes=900000000
    replica.fetch.max.bytes=900000000
    
  • 制片人

    max.request.size=100000000 
    
  • 消费者

    max.partition.fetch.bytes=100000000
    fetch.message.max.bytes=100000000
    
  • 客户端应用

    props.put("max.request.size",96214400);
    props.put("message.max.bytes",96214400);
    

【问题讨论】:

    标签: apache-kafka


    【解决方案1】:

    正在移动评论以回答...

    message.max.bytes 是集群范围的设置,您需要确保相应的max.message.bytes 配置也在主题级别设置。由于主题级配置默认为 1048588,您会看到此错误。

    【讨论】:

      【解决方案2】:
      kafka-topics.bat --create --zookeeper 127.0.0.1:2181 --replication-factor 1 --partitions 1 --topic test --config max.message.bytes=9000000
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-01-16
        • 2017-05-05
        • 2015-03-06
        • 2015-04-02
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多