How To handle "String literal size exceeds compiler limit" in gatling script

Hello,

we are trying to build TCIL request in which we will be sending the formatted EDIFACT messages.
one of the request has very long message to be sent and it throws error “String literal size exceeds compiler limit” when we insert the string

.exec(tcil(“Request1”).requestReply

       .message(StringBody("string to be sent"))

so could you please help to resolve this issue.

Move it into a file:

.message(RawFileBody("file to be sent"))

or

.message(ElFileBody("file to be sent"))

see Gatling - HTTP Request