Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Special holiday offer! You and a friend can attend FabCon with a BOGO code. Supplies are limited. Register now.

Reply
bw_chec
Helper I
Helper I

Kafka Request Message Too Large

I have a MySQL CDC stream from a flexible server in Azure.

 

The write messages aren't coming through to Eventstream and we are getting the following message:

 

Reason: org.apache.kafka.connect.errors.ConnectException: Unrecoverable exception from producer send callback Caused by: org.apache.kafka.common.errors.RecordTooLargeException: The message is 1407136 bytes when serialized which is larger than 1048576, which is the value of the max.request.size configuration.

 

Is there any way to change the kafka max.request.size config? 

Any help appreciated.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bw_chec ,

 

max.request.size
The maximum value of the message that the producer client can send, the default value is 1048576B, 1MB. it is not recommended to blindly modify this parameter, this parameter involves the linkage of some other parameters, such as the message.max.bytes parameter on the broker side, if the broker's message.max.bytes parameter is set to 10, and the max. request.size is set to 20, the producer parameter will report an error when sending a message with a size of 15B.

Therefore, you need to modify the above multiple parameters consecutively to take effect

Modify the following:

message.max.bytes 2M (modified on the broker side)

max.request.size 2M (modified on the client side)
After restarting again, the data is extracted to kafka normally.

 

For more details, please refer:

Send Large Messages With Kafka | Baeldung

How to send Large Messages in Apache Kafka? (conduktor.io)

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @bw_chec ,

 

max.request.size
The maximum value of the message that the producer client can send, the default value is 1048576B, 1MB. it is not recommended to blindly modify this parameter, this parameter involves the linkage of some other parameters, such as the message.max.bytes parameter on the broker side, if the broker's message.max.bytes parameter is set to 10, and the max. request.size is set to 20, the producer parameter will report an error when sending a message with a size of 15B.

Therefore, you need to modify the above multiple parameters consecutively to take effect

Modify the following:

message.max.bytes 2M (modified on the broker side)

max.request.size 2M (modified on the client side)
After restarting again, the data is extracted to kafka normally.

 

For more details, please refer:

Send Large Messages With Kafka | Baeldung

How to send Large Messages in Apache Kafka? (conduktor.io)

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
December Fabric Update Carousel

Fabric Monthly Update - December 2025

Check out the December 2025 Fabric Holiday Recap!

Real Time Intelligence in a Day

Real-Time Intelligence in a Day—Free Training

Turn streaming data into instant insights with Microsoft Fabric. Learn to connect live sources, visualize in seconds, and use Copilot + AI for smarter decisions.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.