Hello SoniaMehta ,
There should be no hard limit on the size of message context variable, but the gateway will raise error if the message size exceed the value of cluster wide property io.xmlPartMaxBytes (it's 2.5MB by default). You can set it as 0 for unlimited size, but it's not a good practice.
Regards,
Mark