server:
  port: ${pcp.ports.route-processing:7004}

springdoc:
  swagger-ui:
    path: /swagger/ui

spring:
  boot:
    admin:
      client:
        instance:
          service-base-url: ${pcp.services.route-processing}
          service-path: /swagger/ui
          management-base-url: ${pcp.services.route-processing}
  datasource:
    driver-class-name: org.postgresql.Driver
    url: jdbc:postgresql://${pcp.infra.postgres.host}:${pcp.infra.postgres.port}/pcp_route_processing
    username: postgres
    password: password
  jpa:
    hibernate:
      ddl-auto: validate
    properties:
      hibernate:
        format_sql: true
  flyway:
    enabled: true
    baseline-on-migrate: true
    locations: classpath:db/migration
  kafka:
    bootstrap-servers: ${pcp.infra.kafka.host}:${pcp.infra.kafka.port}
    consumer:
      group-id: pcp-route-processing-service
      auto-offset-reset: earliest
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      enable-auto-commit: false
    producer:
      key-serializer: org.apache.kafka.common.serialization.StringSerializer
      value-serializer: org.apache.kafka.common.serialization.StringSerializer
      acks: all
      retries: 10
      properties:
        enable.idempotence: true
        max.in.flight.requests.per.connection: 5
    listener:
      missing-topics-fatal: false
      ack-mode: manual_immediate

app:
  route-passport:
    consumer:
      retry:
        max-attempts: 3
        backoff-ms: 1000
        max-backoff-ms: 30000
    outbox:
      enabled: true
      batch-size: 50
      fixed-delay-ms: 1000
      lock-timeout-ms: 60000
      initial-backoff-ms: 1000
      max-backoff-ms: 60000
  kafka:
    topics:
      input: pcp.request.survey-georeference.v1
      input-dlq: pcp.request.survey-georeference-dlq.v1
      processed-route: pcp.route.in.v1
      route-georeference: pcp.route.georeference.v1
