aws-appsync-chat
aws-appsync-chat copied to clipboard
how to identify number of active subscribers by subscription in appsync
Need to keep count of how many subscribers are connected with each subscription.
For UserA, UserB are connected with SubscriptionA : then 2 is the total subscribers For UserA are connected with SubscriptionB : then 1 is the total subscribers
Can i know when UserA unsubscribes , subscribes, disconnects, reconnects from AppSync ?
You can add to User a boolean attribute for "a connected state". And do subscriptions linked to this attribute.