Realtime events

Social feature provides an ability to subscribe to Community / Post / Comment objects by topics. Updates on the subscribed objects can be observed with Live Object / Collection.

Requirements

User is required to be a 'Member' of the community in order to subscribe to updates from the community or other updates from content created within the community.

Once user leaves the community, the user will no longer receive realtime events.

Topic Subscription

Each object type provides topic options, which User can select to subscribe upon business context and interests.

Community topic

  • COMMUNITY - subscription to changes of the community object

  • POSTS - subscription to changes of post objects in the community

  • COMMENTS - subscription to changes of comment objects in the community

  • POSTS_AND_COMMENTS- subscription to changes of post and comment objects in the community

Usage

Post topic

  • POST - subscription to changes of the post object

  • COMMENTS - subscription to changes of comment objects on the post

Usage

Comment topic

  • COMMENT - subscription to changes of the comment object

Usage

User topic

  • USER - subscription to changes of the user object

  • POSTS - subscription to changes of post objects in the user feed

  • COMMENTS - subscription to changes of comment objects in the user feed

  • POSTS_AND_COMMENTS- subscription to changes of post and comment objects in the user feed

Usage

Follow topic

  • MY_FOLLOWINGS - subscription to changes of the follow status between active user and the users followed by the active user

  • MY_FOLLOWERS - subscription to changes of the follow status between active user and the users following the active user

Usage

Unsubscription

To ensure subscription count is under limit, the best practice is unsubscribing when it's not in use or at least unsubscribe topics when leaving the screen.

Every topic subscription provides a method to unsubscribe

Usage

Limitations

Up to ten Users with the same userId can receive real time events. One User can subscribe to a maximum of 20 topics. Newly created objects will not be reflected via Live Collection. User needs to perform a refresh action by creating a new Live Collection with the same query.

Persistence topic subscription

Topic subscriptions are maintained in case User went offline and came back. To start a new session by clearing all previous topic subscriptions, ensure that the previous session is cleared.

Last updated