Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/docs/basics/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The following other protocols are supported:

| Protocol | Description |
|----------|-------------|
| **[MQTT](/docs/protocols/mqtt)** | Translate between the [Message Queuing Telemetry Transport (MQTT)](https://mqtt.org) and Ably's own protocol. Often used in remote devices with small footprints |
| **[SSE](/docs/protocols/sse)** | Use Server Sent Events (SSE) to get a realtime stream of events from Ably, where using a full SDK is impractical. Often used when you have stringent memory restrictions and only need to subscribe to events, not publish them |
| **[Pusher Adapter](/docs/protocols/pusher)** | Quickly migrate from Pusher to Ably using the Pusher Adapter |
| **[PubNub Adapter](/docs/protocols/pubnub)** | Quickly migrate from PubNub to Ably using the PubNub Adapter |
| [MQTT](/docs/protocols/mqtt) | Translate between the [Message Queuing Telemetry Transport (MQTT)](https://mqtt.org) and Ably's own protocol. Often used in remote devices with small footprints |
| [SSE](/docs/protocols/sse) | Use Server Sent Events (SSE) to get a realtime stream of events from Ably, where using a full SDK is impractical. Often used when you have stringent memory restrictions and only need to subscribe to events, not publish them |
| [Pusher Adapter](/docs/protocols/pusher) | Quickly migrate from Pusher to Ably using the Pusher Adapter |
| [PubNub Adapter](/docs/protocols/pubnub) | Quickly migrate from PubNub to Ably using the PubNub Adapter |
12 changes: 12 additions & 0 deletions src/pages/docs/platform/errors/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@ The following explains each property of an `ErrorInfo` object:
* `nonfatal` := A boolean indicating whether the error is critical.
* `href` := A direct link to Ably's documentation or for quick troubleshooting references.

## Request retry guidance <a id="retry"/>

You should not manually retry a request if it returns an error when using an Ably client library.

Most errors are 4xx client errors, meaning that something is wrong with the request. Retrying is not recommended as it's unlikely to give a different result. Retrying a badly formed request will result in it failing every time, leading to an infinite retry loop that can consume the API request limit and affect other clients.

5xx server errors indicate a problem at Ably's end. The Ably client libraries handle retries automatically, retrying the request up to three times to different endpoints across different datacenters before returning the error.

<Aside data-type='note'>
Realtime publishes that result in 5xx errors are not automatically retried by the SDK, unlike REST publishes. To retry an unsuccessful realtime publish, use the REST publish method instead, which will enable automatic retries if the REST publish also fails.
</Aside>

## Logging <a id="logging"/>

Ably SDKs allow you to customize the function that handles logging. This function is usually set in the options when configuring a client, such as the `ClientOptions` object for Pub/Sub.
Expand Down
22 changes: 22 additions & 0 deletions src/pages/docs/platform/pricing/faqs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,28 @@ If the `data` is binary and the message is sent on a text transport with base64

If [publishing](/docs/api/realtime-sdk/channels#publish) an array of messages, the message size limit applies to the sum of all messages in the array, as they are treated as a single unit by the Ably platform. This is even though the are published and broadcast atomically.

### My account has a higher message size limit, but REST publishes are still refused <a id="message-size-client-limit"/>

If you have an Enterprise account with a custom message size limit higher than the standard 64kB, REST client library publishes may still be refused with an error like "Maximum size of messages that can be published at once exceeded (was xxxxx bytes; limit is 65536 bytes)".

This occurs because the message size limit is enforced by the REST client library locally, before the message is sent to Ably. Unlike realtime client libraries, the server cannot inform REST clients of custom higher limits configured for your account.

Configure the client library with the higher limit using the `maxMessageSize` client option when instantiating the client. For example, if your account has a 128kB message size limit:

<Code>
```javascript
const rest = new Ably.Rest({
key: 'your-api-key',
maxMessageSize: 131072 // 128kB in bytes
});
```
</Code>

The `maxMessageSize` value should be set in bytes. Common conversions:
* 128kB = 131,072 bytes
* 256kB = 262,144 bytes
* 512kB = 524,288 bytes

### What happens if I exceed a limit? <a id="limit"/>

The effect of exceeding a [limit](/docs/platform/pricing/limits) differs depending on the limit.
Expand Down