Topic delivery priority
You can set a delivery priority for each topic, which is used in case of an update backlog to a session.
Topic delivery priority
- a topic is being updated at a high rate
- Diffusion Cloud or client are heavily loaded
- the client session is recovering from a temporary disconnection
- there is poor network connectivity between Diffusion Cloud and the client
In many applications, some topics are more time-sensitive than others. Topic delivery priority enables you to specify which topics should be prioritised if there is a backlog.
Priority is set with the PRIORITY topic property. The possible values are high, default and low.
The priority affects the order of topic updates sent to a subscribed client session. When there are multiple topic updates for topics with different priorities in a session's outbound queue, updates for high priority topics will be delivered first, followed by updates for default priority topics, followed by updates for low priority topics.
Topic subscription and unsubscription notifications are also delivered according to the topic delivery priority.
Considerations
- If you do not specify a delivery priority, the default priority will apply.
- Delivery priorities will have little effect in conditions of light load, when updates only remain in the outbound queue for a few milliseconds, so there is a lower chance of topic updates being reordered based on their priority.
- You can reduce the load on your clients by making sure that only the required data is being delivered. Consider using topic views to reduce the amount of topic updates each client receives. You can avoid sending updates for parts of the topic tree that are not relevant to the client, or apply a topic view throttling clause to limit the rate of updates to a client.
- Messages from the server to the client that are not topic updates, for example ping requests and responses, are queued with the default delivery priority.