bootique / bootique-kafka

Provides integration of Kafka client and streams with Bootique
http://bootique.io
Apache License 2.0
4 stars 4 forks source link

Enrich consumer configuration with `heartbeat.interval.ms` #16

Closed elena-bondareva closed 5 years ago

elena-bondareva commented 6 years ago

The heartbeat.interval.ms is absent in consumer config:

  clusters:
    bootstrapServer: localhost:9092
  consumer:
    autoCommit: true
    autoCommitIntervalMs: 1000
    defaultGroup: 'default'
    sessionTimeoutMs: 3000

If user occasionally set sessionTimeoutMs >= heartbeat (default value 3000), an exception is thrown:

Caused by: java.lang.IllegalArgumentException: Heartbeat must be set lower than the session timeout
       at org.apache.kafka.clients.consumer.internals.Heartbeat.<init>(Heartbeat.java:39)

It's necessary to add heartbeat.interval.ms property, to allow user to configure consumer in an arbitrary way.