Package 

Class ChannelMessageLimit


  • 
    public final class ChannelMessageLimit
    
                        

    Defines a message limit for a specific channel type.

    This class specifies the maximum number of messages to keep in memory for channels of a particular type. When the number of messages in a channel exceeds this limit (plus a 30-message buffer), the SDK automatically trims older messages from the in-memory state, keeping only the most recent messages up to the limit.

    Example usage:

    // Limit messaging channels to 100 messages in memory
    ChannelMessageLimit(channelType = "messaging", baseLimit = 1000)
    
    // Limit livestream channels to 50 messages in memory
    ChannelMessageLimit(channelType = "livestream", baseLimit = 500)
    • Constructor Detail

      • ChannelMessageLimit

        ChannelMessageLimit(String channelType, Integer baseLimit)
        Parameters:
        channelType - The type of the channel for which this limit applies (e.g., "messaging", "livestream", "commerce").
        baseLimit - The maximum number of messages to keep in memory for channels of this type.