code: public <K, V> StatefulRedisPubSubConnection<K, V> connectPubSub(RedisCodec<K, V> codec) {
          checkForRedisURI();
          return getConnection(connectPubSubAsync(codec, redisURI, timeout));
      }
docs: Open a new pub/sub connection to the Redis server using the supplied {@link RedisURI} and use the supplied
  {@link RedisCodec codec} to encode/decode keys and values.
  
  @param codec Use this codec to encode/decode keys and values, must not be {@literal null}
  @param <K> Key type
  @param <V> Value type
  @return A new stateful pub/sub connection