package com.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Kafka Consumer 配置属性类
 * 替代 AppConfig 的静态方法读取，支持 docker-compose 环境变量覆盖
 */
@Data
@Component
@ConfigurationProperties(prefix = "spring.kafka.consumer")
public class KafkaConsumerProperties {
    /** Kafka 集群地址 */
    private String bootstrapServers = "192.168.4.99:9092";
    /** 消费者组ID */
    private String groupId = "agent-syslog-group";
    /** 消费位置重置策略 */
    private String autoOffsetReset = "latest";
    /** 是否自动提交 */
    private boolean enableAutoCommit = false;
    /** 自动提交间隔(ms) */
    private String autoCommitInterval = "1000";
    /** 消费Topic */
    private String topic = "agent-syslog-topic";
}
