platform-core/platform-cache/src/main/java/org/sunbird/cache/util/RedisCacheUtil.java
public static void subscribe(JedisPubSub pubSub, String... channel) {
        if (null != channel && null != pubSub) {
            Jedis jedis = getConnection();
            try {
                jedis.subscribe(pubSub, channel);
            } catch (Exception e) {
                TelemetryManager.error("Exception Occurred While Subscribing to Redis Channel : " + channel + " | Exception is : ", e);
                throw new ServerException(CacheErrorCode.ERR_CACHE_SUBSCRIBE_CHANNEL_ERROR.name(), e.getMessage());
            }
        }
    }
/**
     * This method subscribe to given channel/channels to receive messages.
     *
     * @param pubSub
     * @param channel
     */
This method subscribe to given channel/channels to receive messages.
@param pubSub
@param channel
This method subscribe to given channel / channels to receive messages . @param pubSub @param channel
public static void subscribe(JedisPubSub pubSub, String... channel) {
        if (null != channel && null != pubSub) {
            Jedis jedis = getConnection();
            try {
                jedis.subscribe(pubSub, channel);
            } catch (Exception e) {
                TelemetryManager.error("Exception Occurred While Subscribing to Redis Channel : " + channel + " | Exception is : ", e);
                throw new ServerException(CacheErrorCode.ERR_CACHE_SUBSCRIBE_CHANNEL_ERROR.name(), e.getMessage());
            }
        }
    }
public static void subscribe ( JedisPubSub pubSub , String ... channel ) { if ( null != channel && null != pubSub ) { Jedis jedis = getConnection ( ) ; try { jedis . subscribe ( pubSub , channel ) ; } catch ( Exception e ) { TelemetryManager . error ( "Exception Occurred While Subscribing to Redis Channel : " + channel + " | Exception is : " , e ) ; throw new ServerException ( CacheErrorCode . ERR_CACHE_SUBSCRIBE_CHANNEL_ERROR . name ( ) , e . getMessage ( ) ) ; } } }
This method subscribe to given channel/channels to receive messages.
This method subscribe to given channel / channels to receive messages .