How do I avoid hitting the Max Channel Message Rate Limit by sharding messages across channels?

Unless you have a bespoke package, the maximum number of messages that can be published on a channel per second is 50. If you try to publish any more than this then the message will be refused with a 42910 error code. We have this limit in order to avoid hotspots on our system.

To avoid the limit, it is recommended that you provision enough channels that you can shard the rate across several channels - hence avoiding the limit. Alternatively, you can batch messages server side into several larger messages. If you'd like to see an example of how this is done, please see our Developer Relations demo here.

If you are interested in a bespoke package which would allow a higher rate then please contact one of our commercial team by emailing sales@ably.com

If you have any questions or require any further assistance, head to our support page and we'll gladly help you.