# One consumer thread per pod; KEDA adds pods. app: topic: orders work-ms: 0 spring: application: name: keda-consumer kafka: bootstrap-servers: ${KAFKA_BOOTSTRAP:localhost:9092} consumer: group-id: orders-consumer auto-offset-reset: earliest enable-auto-commit: false # the container commits after each batch max-poll-records: 50 key-deserializer: org.apache.kafka.common.serialization.StringDeserializer value-deserializer: org.apache.kafka.common.serialization.StringDeserializer properties: # cooperative rebalancing: pods joining/leaving only move the partitions that must move partition.assignment.strategy: org.apache.kafka.clients.consumer.CooperativeStickyAssignor session.timeout.ms: 15000 listener: concurrency: 1 # how long a stopping container waits for the in-flight batch (Spring Kafka default 10s) shutdown-timeout: 20s lifecycle: # must be shorter than the pod's terminationGracePeriodSeconds timeout-per-shutdown-phase: 25s server: shutdown: graceful management: endpoint: health: probes: enabled: true endpoints: web: exposure: include: health