ably / ably-java

Java, Android, Clojure and Scala client library SDK for Ably realtime messaging service
https://ably.com/download
Apache License 2.0
86 stars 39 forks source link

Max message size and/or number of messages per ProtocolMessage / REST post #18

Open mattheworiordan opened 9 years ago

mattheworiordan commented 9 years ago

Currently there is no rules to restrict the number of messages or total message size per ProtocolMessage or REST message post

See https://github.com/ably/ably-java/blob/master/src/io/ably/rest/Channel.java#L64 and https://github.com/ably/ably-java/blob/master/src/io/ably/realtime/Channel.java#L455.

There is a separate issue to provide limit info to the client library, however even before that we should perhaps implement some generic limit defaults that can be overridden in ClientOptions. Therefore we should break up messages so that total message size & request size is enforced by the client.

I expect this may need to apply to ably-js as well although yet to review.

┆Issue is synchronized with this Jira Task by Unito

mattheworiordan commented 9 years ago

FYI, an overly simple implementation is included in the Ably Ruby lib - see https://github.com/ably/ably-ruby/blob/master/lib/ably/realtime/channel.rb#L50-L51. This does not factor in message size or allow defaults to be changed so is not very practical.