How can I test the maximum message size?

All accounts are able to send up to 32KB size message payloads.

You can estimate the messages size before it is published to prevent sending messages that are too large.