Understanding WebSocket system messages in elastic channels for Amazon Chime SDK meetings
The Amazon Chime SDK sends system messages to all connected clients for events that take place in channels. The following list describes the system messages for elastic channels.
- Message events
-
Event payloads for elastic channels contain the
subChannelIdfield. Payloads for non-elastic channels remain the same. - Membership events
-
The
CREATE_CHANNEL_MEMBERSHIPandDELETE_CHANNEL_MEMBERSHIPevents now have thesubChannelIdfield in their payloads.Elastic channels don't support the
BATCH_CREATE_CHANNEL_MEMBERHSIPevent. When you call the BatchCreateChannelMembership API, the system sends individualCREATE_CHANNEL_MEMBERSHIPevents.You can now use the
UPDATE_CHANNEL_MEMBERSHIPevent type to signal changes in membership information. For example, during a member transfer from one sub-channel to another, the system sends anUPDATE_CHANNEL_MEMBERSHIPevent with the newSubChannelIdin the payload to indicate that the member was transferred.Note
The system only sends the
UPDATE_CHANNEL_MEMBERSHIPevent to the member that was transferred, and not to other members of the sub-channel. For this reason, we encourage you to use the ListChannelMemberships API instead of WebSockets to populate your channel membership rosters. For more information, refer to Using WebSockets to receive messages in Amazon Chime SDK messaging.