code: public static int getMaxBufSize(final Map<String, Object> stormConfig) {
          final Object value = stormConfig.get(CONFIG_BUFFER_MAX_MESSAGES);
          if (value != null) {
              try {
                  return Integer.parseInt(String.valueOf(value).trim());
              }
              catch (final NumberFormatException e) {
                  LOG.warn("invalid value for '{}' in storm config ({}); falling back to default ({})", CONFIG_BUFFER_MAX_MESSAGES, value, DEFAULT_BUFFER_MAX_MESSAGES);
              }
          }
  
          return DEFAULT_BUFFER_MAX_MESSAGES;
      }
docs: Retrieves the maximum buffer size to be used from storm's configuration map, or the
  {@link #DEFAULT_BUFFER_MAX_MESSAGES} if no such value was found using {@link #CONFIG_BUFFER_MAX_MESSAGES}.
  
  @param stormConfig Storm's configuration map.
  @return The maximum buffer size to use.