acks=all
or acks=-1
, two configuration parameters control message replication:
managedLedgerDefaultWriteQuorum
: Specifies the replication factor for storing messages (number of replicas)managedLedgerDefaultAckQuorum
: Specifies the minimum number of replicas that must acknowledge a write before it is considered successfulSIGKILL
) or soft failures (for example, expired session timeouts). These failures are detected when consumers fail to send heartbeats or poll()
calls.
Consumer liveness is maintained with a heartbeat (running in a background thread since KIP-62). The session.timeout.ms
configuration parameter dictates the timeout used to detect failed heartbeats. You can increase the session timeout to account for potential network delays and avoid soft failures.
Soft failures most commonly occur in two cases:
poll()
returns a batch of messages that take too long to processpoll()
loop that spends significant time processing messages, you can:
max.poll.interval.ms
to allow more time between fetching recordsmax.poll.records
to decrease the batch size returnedConfiguration | Recommended Value | Default Value | Description |
---|---|---|---|
session.timeout.ms | 30000-60000 | 45000 | Time before consumer is considered failed |