@Override public Map<String, String> toConfig() { HashMap<String, String> configs = new HashMap<>(super.toConfig()); // Note: Kafka configuration needs the topic's physical name, not the stream-id. // We won't have that here if user only specified it in configs, or if it got rewritten // by the planner to something different than what's in this descriptor. String streamName = getPhysicalName().orElse(getStreamId()); String systemName = getSystemName(); consumerAutoOffsetResetOptional.ifPresent(autoOffsetReset -> configs.put(String.format(CONSUMER_AUTO_OFFSET_RESET_CONFIG_KEY, systemName, streamName), autoOffsetReset)); consumerFetchMessageMaxBytesOptional.ifPresent(fetchMessageMaxBytes -> configs.put(String.format(CONSUMER_FETCH_MESSAGE_MAX_BYTES_CONFIG_KEY, systemName, streamName), Long.toString(fetchMessageMaxBytes))); return configs; } }
@Override public Map<String, String> toConfig() { HashMap<String, String> configs = new HashMap<>(super.toConfig()); // Note: Kafka configuration needs the topic's physical name, not the stream-id. // We won't have that here if user only specified it in configs, or if it got rewritten // by the planner to something different than what's in this descriptor. String streamName = getPhysicalName().orElse(getStreamId()); String systemName = getSystemName(); consumerAutoOffsetResetOptional.ifPresent(autoOffsetReset -> configs.put(String.format(CONSUMER_AUTO_OFFSET_RESET_CONFIG_KEY, systemName, streamName), autoOffsetReset)); consumerFetchMessageMaxBytesOptional.ifPresent(fetchMessageMaxBytes -> configs.put(String.format(CONSUMER_FETCH_MESSAGE_MAX_BYTES_CONFIG_KEY, systemName, streamName), Long.toString(fetchMessageMaxBytes))); return configs; } }
@Override public Map<String, String> toConfig() { HashMap<String, String> configs = new HashMap<>(super.toConfig()); // Note: Kafka configuration needs the topic's physical name, not the stream-id. // We won't have that here if user only specified it in configs, or if it got rewritten // by the planner to something different than what's in this descriptor. String streamName = getPhysicalName().orElse(getStreamId()); String systemName = getSystemName(); consumerAutoOffsetResetOptional.ifPresent(autoOffsetReset -> configs.put(String.format(CONSUMER_AUTO_OFFSET_RESET_CONFIG_KEY, systemName, streamName), autoOffsetReset)); consumerFetchMessageMaxBytesOptional.ifPresent(fetchMessageMaxBytes -> configs.put(String.format(CONSUMER_FETCH_MESSAGE_MAX_BYTES_CONFIG_KEY, systemName, streamName), Long.toString(fetchMessageMaxBytes))); return configs; } }