...
Goal | Fetch Session ID | Fetch Session Epoch |
---|---|---|
Make a full fetch request | 0 | Long.MAX_VALUE |
Make a full fetch request and request a new incremental fetch session | 0 | 0 |
Make an incremental fetch request | The incremental fetch session ID | The incremental fetch session epoch |
Make a full fetch request which resets an existing incremental fetch session | The incremental fetch session ID | 0 |
The FetchResponse now contains a fetch session ID.
...
- Needing to fetch from a new offset in the partition
- Changing the maximum number of bytes which should be fetched from the partition
- Changes in the logStartOffset of the partition on the follower
Note that the existing system by which the leader becomes aware of changes to the follower's fetch position is not changed. Every time the follower wants to update the fetch position, it must include the partition in the next incremental request. Also note that if no partitions have changed, the next incremental FetchRequest will not contain any partitions at all.
...
records => RECORDS
New Configurations
min.incremental.fetch.session.size
This is a broker configuration which sets the minimum size of a fetch session. The broker will not create incremental fetch sessions for fetch requests smaller than this.
incremental.fetch.session.cache.slots.per.broker
This is a broker configuration which sets the number of incremental fetch session cache slots per broker. Slots for a particular broker cannot be used by another broker.
incremental.fetch.session.consumer.cache.slots
This is a broker configuration which sets the number of incremental fetch session cache slots available for Kafka consumers.
min.incremental.fetch.session.eviction.
...
time.ms
This is a broker configuration. Fetch sessions which are not used within this timeout are eligible for eviction.
...
This is a configuration for brokers or Kafka consumers. If it is set to true, we will request an incremental fetch session when fetching partition data from other brokers. If it is set to false, we will not. The default is true.
Compatibility, Deprecation, and Migration Plan
...