I am writing a Dataframe with 30000 entries into kafka using the below params
.format("kafka")
.option("kafka.bootstrap.servers", kafka_brokers)
.option("kafka.compression.type","lz4")
.option("kafka.max.request.size", 1048576)
.option("kafka.message.max.bytes", 750000)
.option("kafka.max.request.size",750000)
.option("kafka.max.partition.fetch.bytes",750000)
.option("kafka.batch.size", 100)
.option("key.serializer", "org.apache.kafka.common.serialization.StringSerializer")
.option("value.serializer", "org.apache.kafka.common.serialization.JsonSerializer")
.option("topic", product_kafka_topic)
.option("partition",15)
I am not getting is how Spark is partitioning the Dataframe, I get the error
org.apache.kafka.common.errors.RecordTooLargeException: The message is 10540452 bytes when serialized which is larger than 750000, which is the value of the max.request.size configuration.
How can I solve it?