General Broker Settings
Review the following settings in the Advanced kafka-broker category, and modify as needed:
-
auto.leader.rebalance.enable -
Enables automatic leader balancing. A background thread checks and triggers leader balancing (if needed) at regular intervals. The default is
enabled. -
unclean.leader.election.enable -
This property allows you to specify a preference of availability or durability. This is an important setting: If availability is more important than avoiding data loss, ensure that this property is set to
true. If preventing data loss is more important than availability, set this property tofalse.This setting operates as follows:
-
If
unclean.leader.election.enableis set totrue(enabled), an out-of-sync replica will be elected as leader when there is no live in-sync replica (ISR). This preserves the availability of the partition, but there is a chance of data loss. -
If
unclean.leader.election.enableis set tofalseand there are no live in-sync replicas, Kafka returns an error and the partition will be unavailable.
This property is set to
trueby default, which favors availability.If durability is preferable to availability, set
unclean.leader.electiontofalse. -
-
controlled.shutdown.enable -
Enables controlled shutdown of the server. The default is
enabled. -
min.insync.replicas -
When a producer sets
acksto "all",min.insync.replicasspecifies the minimum number of replicas that must acknowledge a write for the write to be considered successful. If this minimum cannot be met, then the producer will raise an exception.When used together,
min.insync.replicasand produceracksallow you to enforce stronger durability guarantees.You should set
min.insync.replicasto 2 for replication factor equal to 3. -
message.max.bytes -
Specifies the maximum size of message that the server can receive. It is important that this property be set with consideration for the maximum fetch size used by your consumers, or a producer could publish messages too large for consumers to consume.
Note that there are currently two versions of consumer and producer APIs. The value of
message.max.bytesmust be smaller than themax.partition.fetch.bytessetting in the new consumer, or smaller than thefetch.message.max.bytessetting in the old consumer. In addition, the value must be smaller thanreplica.fetch.max.bytes. -
replica.fetch.max.bytes -
Specifies the number of bytes of messages to attempt to fetch. This value must be larger than
message.max.bytes. -
broker.rack -
The rack awareness feature distributes replicas of a partition across different racks. You can specify that a broker belongs to a particular rack through the "Custom kafka-broker" menu option. For more information about the rack awareness feature, see http://kafka.apache.org/documentation.html#basic_ops_racks.

