Package ai.superstream.core
Class ConfigurationOptimizer
java.lang.Object
ai.superstream.core.ConfigurationOptimizer
Optimizes Kafka producer configurations based on metadata.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyOptimalConfiguration(Properties properties, Map<String, Object> optimalConfiguration) Apply the optimal configuration to the producer properties.getOptimalConfiguration(MetadataMessage metadataMessage, List<String> applicationTopics) Get the optimal configuration for a set of topics.
-
Constructor Details
-
ConfigurationOptimizer
public ConfigurationOptimizer()
-
-
Method Details
-
getOptimalConfiguration
public Map<String,Object> getOptimalConfiguration(MetadataMessage metadataMessage, List<String> applicationTopics) Get the optimal configuration for a set of topics.- Parameters:
metadataMessage- The metadata messageapplicationTopics- The list of topics that the application might produce to- Returns:
- The optimal configuration, or an empty map if no optimization is possible
-
applyOptimalConfiguration
public List<String> applyOptimalConfiguration(Properties properties, Map<String, Object> optimalConfiguration) Apply the optimal configuration to the producer properties.- Parameters:
properties- The producer properties to modifyoptimalConfiguration- The optimal configuration to apply- Returns:
- The list of configuration keys that were modified
-