spring:
  application:
    name: vehicle-analytics-app
  config:
    import:
      - optional:nacos:${spring.application.name}.${NACOS_CONFIG_FILE_EXTENSION:yml}?group=${NACOS_GROUP:DEFAULT_GROUP}&refreshEnabled=${NACOS_REFRESH_ENABLED:true}
  cloud:
    nacos:
      config:
        enabled: ${NACOS_CONFIG_ENABLED:true}
        server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
        namespace: ${NACOS_NAMESPACE:}
        group: ${NACOS_GROUP:DEFAULT_GROUP}
        file-extension: ${NACOS_CONFIG_FILE_EXTENSION:yml}
        username: ${NACOS_USERNAME:}
        password: ${NACOS_PASSWORD:}
  threads:
    virtual:
      enabled: true
  datasource:
    url: ${MYSQL_JDBC_URL:}
    username: ${MYSQL_USERNAME:}
    password: ${MYSQL_PASSWORD:}
    driver-class-name: com.mysql.cj.jdbc.Driver

server:
  port: ${HTTP_PORT:20300}

springdoc:
  swagger-ui:
    path: /swagger-ui.html
  api-docs:
    path: /v3/api-docs

lingniu:
  ingest:
    sink:
      kafka:
        enabled: true
        bootstrap-servers: ${KAFKA_BROKERS:114.55.58.251:9092}
        topics:
          realtime: ${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}
          dlq: ${KAFKA_TOPIC_JT808_DLQ:vehicle.dlq.jt808.v1}
        consumer:
          enabled: ${KAFKA_CONSUMER_ENABLED:true}
          client-id-prefix: ${KAFKA_CONSUMER_CLIENT_ID_PREFIX:vehicle-analytics}
          auto-offset-reset: ${KAFKA_CONSUMER_AUTO_OFFSET_RESET:earliest}
          max-poll-records: ${KAFKA_CONSUMER_MAX_POLL_RECORDS:500}
          max-poll-interval-millis: ${KAFKA_CONSUMER_MAX_POLL_INTERVAL_MILLIS:900000}
          bindings:
            vehicleStatEnvelopeConsumerProcessor:
              enabled: true
              group-id: ${KAFKA_GROUP_STAT:vehicle-stat}
              topics:
                - ${KAFKA_TOPIC_JT808_EVENT:vehicle.event.jt808.v1}
    vehicle-stat:
      enabled: ${VEHICLE_STAT_ENABLED:true}
      zone-id: ${VEHICLE_STAT_ZONE_ID:Asia/Shanghai}
      jt808:
        enabled: ${VEHICLE_STAT_JT808_MILEAGE_ENABLED:true}

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,prometheus
  endpoint:
    health:
      probes:
        enabled: ${MANAGEMENT_HEALTH_PROBES_ENABLED:true}
  metrics:
    tags:
      application: vehicle-analytics-app
