@SuppressWarnings("WeakerAccess")
    public Map<String, Object> getGlobalConsumerConfigs(final String clientId) {
        final Map<String, Object> baseConsumerProps = getCommonConsumerConfigs();

        // Get global consumer override configs
        final Map<String, Object> globalConsumerProps = originalsWithPrefix(GLOBAL_CONSUMER_PREFIX);
        baseConsumerProps.putAll(globalConsumerProps);

        // no need to set group id for a global consumer
        baseConsumerProps.remove(ConsumerConfig.GROUP_ID_CONFIG);
        // no need to set instance id for a restore consumer
        baseConsumerProps.remove(ConsumerConfig.GROUP_INSTANCE_ID_CONFIG);

        // add client id with stream client id prefix
        baseConsumerProps.put(CommonClientConfigs.CLIENT_ID_CONFIG, clientId + "-global-consumer");
        baseConsumerProps.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "none");

        return baseConsumerProps;
    }
Get the configs for the {@link KafkaConsumer global consumer}.
Properties using the prefix {@link #GLOBAL_CONSUMER_PREFIX} will be used in favor over
the properties prefixed with {@link #CONSUMER_PREFIX} and the non-prefixed versions
(read the override precedence ordering in {@link #GLOBAL_CONSUMER_PREFIX})
except in the case of {@link ConsumerConfig#BOOTSTRAP_SERVERS_CONFIG} where we always use the non-prefixed
version as we only support reading/writing from/to the same Kafka Cluster.
If not specified by {@link #GLOBAL_CONSUMER_PREFIX}, global consumer will share the general consumer configs
prefixed by {@link #CONSUMER_PREFIX}.

@param clientId clientId
@return Map of the global consumer configuration.
streams/src/main/java/org/apache/kafka/streams/StreamsConfig.java