Skip to main content

Add low-priority message types

When message volume in an open channel exceeds the server's processing capacity, the system drops the most recent messages by default. To protect important messages from being dropped, mark less important message types as low-priority so they are dropped first.

You can configure up to 20 message types as low-priority. Under heavy server load, low-priority messages are dropped first. For example, mark a custom "like" message type as low-priority so it is dropped before more important messages.

How it works

  • Default behavior: All messages are high-priority. The server processes up to 40 messages per 200 ms per open channel: 20 slots are reserved for high-priority messages, and 20 slots are shared between high-priority and low-priority messages.
  • Under load: Low-priority messages are dropped first, freeing the shared slots for high-priority messages.
  • Limit: Up to 20 message types can be configured as low-priority per app.
tip

Low-priority message types controls which messages are dropped first. To protect important messages from ever being dropped, use the Priority senders and priority messages feature instead.

Enable the service

This feature is available only on the Pro plan. Before using it, enable Open channel message priority for your App Key in the console.

If the service is not enabled, the API returns error 1009. If you exceed the rate limit while the service is disabled, the API returns HTTP 429 (error code 1008).

Request

POST: https://[Base URL](/platform-chat-api/base-url)/v4/open-channel/low-priority-message-type-list/add

Rate limit: 100 per second

Signature: Required. See API request signature.

Request body

Content type: application/json

ParameterTypeRequiredDescription
messageTypesArrayYesMessage types to set as low-priority. Maximum 5 per request, maximum 20 total.

Request example

HTTP
POST /v4/open-channel/low-priority-message-type-list/add HTTP/1.1
Host: api.sg-light-api.com
App-Key: uwd1c0sxdlx2
Timestamp: 1408710653491
Nonce: 14314
Signature: 45beb7cc7307889a8e711219a47b7cf6a5b000e8
Content-Type: application/json

{
"messageTypes": ["RC:VcMsg", "RC:ImgTextMsg", "RC:ImgMsg"]
}

Response

FieldTypeDescription
codeNumberReturn code. 0 indicates success.

Response example

HTTP
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{"code":0}