KafkaConstants.java 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package com.provectus.kafka.ui.util;
  2. import java.util.AbstractMap;
  3. import java.util.Map;
  4. import static org.apache.kafka.common.config.TopicConfig.*;
  5. public final class KafkaConstants {
  6. private KafkaConstants() {
  7. }
  8. public static final Map<String, String> TOPIC_DEFAULT_CONFIGS = Map.ofEntries(
  9. new AbstractMap.SimpleEntry<>(CLEANUP_POLICY_CONFIG, CLEANUP_POLICY_DELETE),
  10. new AbstractMap.SimpleEntry<>(COMPRESSION_TYPE_CONFIG, "producer"),
  11. new AbstractMap.SimpleEntry<>(DELETE_RETENTION_MS_CONFIG, "86400000"),
  12. new AbstractMap.SimpleEntry<>(FILE_DELETE_DELAY_MS_CONFIG, "60000"),
  13. new AbstractMap.SimpleEntry<>(FLUSH_MESSAGES_INTERVAL_CONFIG, "9223372036854775807"),
  14. new AbstractMap.SimpleEntry<>(FLUSH_MS_CONFIG, "9223372036854775807"),
  15. new AbstractMap.SimpleEntry<>("follower.replication.throttled.replicas", ""),
  16. new AbstractMap.SimpleEntry<>(INDEX_INTERVAL_BYTES_CONFIG, "4096"),
  17. new AbstractMap.SimpleEntry<>("leader.replication.throttled.replicas", ""),
  18. new AbstractMap.SimpleEntry<>(MAX_COMPACTION_LAG_MS_CONFIG, "9223372036854775807"),
  19. new AbstractMap.SimpleEntry<>(MAX_MESSAGE_BYTES_CONFIG, "1000012"),
  20. new AbstractMap.SimpleEntry<>(MESSAGE_TIMESTAMP_DIFFERENCE_MAX_MS_CONFIG, "9223372036854775807"),
  21. new AbstractMap.SimpleEntry<>(MESSAGE_TIMESTAMP_TYPE_CONFIG, "CreateTime"),
  22. new AbstractMap.SimpleEntry<>(MIN_CLEANABLE_DIRTY_RATIO_CONFIG, "0.5"),
  23. new AbstractMap.SimpleEntry<>(MIN_COMPACTION_LAG_MS_CONFIG, "0"),
  24. new AbstractMap.SimpleEntry<>(MIN_IN_SYNC_REPLICAS_CONFIG, "1"),
  25. new AbstractMap.SimpleEntry<>(PREALLOCATE_CONFIG, "false"),
  26. new AbstractMap.SimpleEntry<>(RETENTION_BYTES_CONFIG, "-1"),
  27. new AbstractMap.SimpleEntry<>(RETENTION_MS_CONFIG, "604800000"),
  28. new AbstractMap.SimpleEntry<>(SEGMENT_BYTES_CONFIG, "1073741824"),
  29. new AbstractMap.SimpleEntry<>(SEGMENT_INDEX_BYTES_CONFIG, "10485760"),
  30. new AbstractMap.SimpleEntry<>(SEGMENT_JITTER_MS_CONFIG, "0"),
  31. new AbstractMap.SimpleEntry<>(SEGMENT_MS_CONFIG, "604800000"),
  32. new AbstractMap.SimpleEntry<>(UNCLEAN_LEADER_ELECTION_ENABLE_CONFIG, "false"),
  33. new AbstractMap.SimpleEntry<>(MESSAGE_DOWNCONVERSION_ENABLE_CONFIG, "true")
  34. );
  35. }