Skip to content

max_send_limit_bytes setting is not working as expected #523

@pratikshavyas

Description

@pratikshavyas

Describe the bug

As per readme file it is mentioned that: max_send_limit_bytes - default: nil - Max byte size to send message to avoid MessageSizeTooLarge. For example, if you set 1000000(message.max.bytes in kafka), Message more than 1000000 byes will be dropped.
However, I see that even if I have set max_send_limit_bytes as 5 MB, there are requests being sent to kafka for 20MB and 16 MB.
Why is fluentd not able to limit the message size? Is there anything else needs to be configured here?
Please suggest asap.

To Reproduce

configuration for the plugin:

<match *>
  @type copy
  <store ignore_error>
    <buffer>
      @type file
      @log_level error
      path /logskafka
      timekey 1d
      flush_thread_count 4
      chunk_limit_size 2MB
      overflow_action drop_oldest_chunk
      flush_mode interval
      flush_interval 5s
      total_limit_size 2GB
      max_send_limit_bytes 5000000
    </buffer>
    @type kafka2
    @log_level error
    brokers service:8097
    topic_key topic
    default_topic messages
  </store>
</match>

Expected behavior

Fluentd should limit the message being sent to kafka to 5 MB as max_send_limit_bytes is set to 5 MB

Your Environment

- Fluentd version: 1.17.0
- fluent-plugin-kafka version: 0.19.2

Your Configuration

configuration for the plugin:

<match *>
  @type copy
  <store ignore_error>
    <buffer>
      @type file
      @log_level error
      path /logskafka
      timekey 1d
      flush_thread_count 4
      chunk_limit_size 2MB
      overflow_action drop_oldest_chunk
      flush_mode interval
      flush_interval 5s
      total_limit_size 2GB
      max_send_limit_bytes 5000000
    </buffer>
    @type kafka2
    @log_level error
    brokers service:8097
    topic_key topic
    default_topic messages
  </store>
</match>

Your Error Log

No logs

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions