Producer Configuration
| Producer Configuration Option | Description | Recommended Value |
|---|---|---|
| linger.ms | The delay time for the Producer to batch send messages, enhancing the efficiency of each request by accumulating more messages. | 100 |
| metadata.max.age.ms | The forced refresh time for metadata to prevent routing errors due to metadata expiration. | 60000 |
| batch.size | The maximum number of bytes in a single batch, directly affecting the number of network requests and throughput. | 1048576 |
| max.request.size | The maximum number of bytes in a single request, limiting the size of messages the Producer can send. | 16777216 |
Consumer Configuration
| Consumer Configuration Options | Description | Recommended Value |
|---|---|---|
| metadata.max.age.ms | The forced refresh time for metadata to prevent route errors due to expired metadata. | 60000 |
| max.partition.fetch.bytes | Limits the maximum amount of data returned in a Fetch request from a single partition, working together with fetch.max.bytes to control fetch granularity. | 8388608 |