My account has a max message size set higher than 64kB, but REST publishes are still refused with a message that says the limit is 65536 bytes

If you have an enterprise account with a custom, higher than normal message size limit, then publishes with REST client libraries may still be refused with a message like "Maximum size of messages that can be published at once exceeded ( was xxxxx bytes; limit is 65536 bytes)".


This is because the limit is enforced by the client library (and unlike with a realtime client library, the server has no way of informing the client of the new, higher limit). The solution is to inform the client library of the higher limit using the maxMessageSize client option. For example, if your account has a message size limit is 128kB, you can instantiate ably-js as

new Ably.Rest({maxMessageSize: 131072, <other client options>});