Writing Big sized messages >1MB with Producer.plainSink

I am trying to write messages >1MB size with Producer.plainSink . The stream finishes after writing first message.
I am not getting any exceptions.
I am using default for akka.kafka.producer .
Also I have changed message.max.bytes, max.message.bytes , replica.fetch.max.bytes = 40000000
Logs are :

[DEBUG] [04/16/2020 01:47:14.692] [default-akka.kafka.default-dispatcher-7] [DefaultProducerStage(akka://default)] [8a0e5] Asynchronous producer assignment lifecycle changed ‘AsyncCreateRequestSent -> Assigned’

[DEBUG] [04/16/2020 01:47:14.692] [default-akka.kafka.default-dispatcher-7] [DefaultProducerStage(akka://default)] [8a0e5] Resume demand

[DEBUG] [04/16/2020 01:47:17.139] [default-akka.kafka.default-dispatcher-14] [DefaultProducerStage(akka://default)] [8a0e5] ProducerStage postStop

[DEBUG] [04/16/2020 01:47:17.143] [default-akka.kafka.default-dispatcher-14] [DefaultProducerStage(akka://default)] [8a0e5] Producer closed

Is there any setting which i need to change to successfully write messages?

I see on Gitter that you found a solution:

Apparently you need to configure producer as well apart from broker and topic.
akka.kafka.producer.kafka-clients.max.request.size=5000000 solved the problem.

Yeah I got it.
So following needs to be Set.
message.max.bytes= <maximum message size in bytes>,
max.message.bytes= <maximum message sizein bytes> ,
replica.fetch.max.bytes = <maximum message sizein bytes>
In producer config -> akka.kafka.producer.kafka-clients.max.request.size = <maximum message size in bytes>