- Enclosing class:
- Resource
@Immutable
public static class Resource.CompositeResource
extends Object
A composite resource is a more complex resource that is composed of multiple resources.
It has one source of truth capacity resource, which denotes its capacity.
However, it has two utilization resources that are used to calculate the utilization of the composite resource.
Usually, these two resources have some implicit hierarchy/priority.
Examples of this include:
- PRODUCE_IN, and cluster-linking's MIRROR_IN. The maximum produce capacity (after which we throttle) is the same for both and tracks the sum of their utilization.
Internally in the core of Kafka, MIRROR_IN fetcher threads throttle themselves based on the utilization of PRODUCE_IN.
- REPLICATION_IN and REASSIGNMENT_IN. The maximum replication capacity (after which we throttle) is the same for both and tracks the sum of their utilization.
But the throttle mechanism only throttles REASSIGNMENT_IN.
Both utilization resources are guaranteed to have the same unit (e.g KiB/s) and apply at the same level (host, broker)