public void embed(final String keyPrefix, final String groupPrefix, final int startingOrd, final ConfigDef child) {
        int orderInGroup = startingOrd;
        for (ConfigKey key : child.sortedConfigs()) {
            define(new ConfigKey(
                    keyPrefix + key.name,
                    key.type,
                    key.defaultValue,
                    embeddedValidator(keyPrefix, key.validator),
                    key.importance,
                    key.documentation,
                    groupPrefix + (key.group == null ? "" : ": " + key.group),
                    orderInGroup++,
                    key.width,
                    key.displayName,
                    embeddedDependents(keyPrefix, key.dependents),
                    embeddedRecommender(keyPrefix, key.recommender),
                    key.internalConfig,
                    key.alternativeString));
        }
    }
Get a list of configs sorted taking the 'group' and 'orderInGroup' into account.

If grouping is not specified, the result will reflect "natural" order: listing required fields first, then ordering by importance, and finally by name.
clients/src/main/java/org/apache/kafka/common/config/ConfigDef.java