public Config subset(String prefix, boolean stripPrefix) {
    Map<String, String> out = new HashMap<>();

    for (Entry<String, String> entry : entrySet()) {
      String k = entry.getKey();
      if (k != null && k.startsWith(prefix)) {
        if (stripPrefix) {
          k = k.substring(prefix.length());
        }

        out.put(k, entry.getValue());
      }
    }

    return new MapConfig(out);
  }
Store and retrieve named, typed values as configuration for classes implementing this interface.
samza-api/src/main/java/org/apache/samza/config/Config.java