Maximum message size depends on several factors. In general, max. size is 2Gb -1. However there are several practical limitations. First of all, some transports (like UDP) can have limitations on the message size. Then, during message delivery MsgConnect uses memory blocks up to 3 times larger than the message itself. Eg. if the message has size of 1 Mb, memory that used at some point of message delivery is 3 Mb. So you must have enough memory for handling large messages.
Also remember that transports don't support resuming of broken delivery and if socket connection is lost, the whole message will be resent. To prevent different kinds of attacks you can set maximum message size for the transport. If the transports starts to receive the amount of data larger than the limit, it will immediately stop receiving large package.