0
0
Kafkadevops~10 mins

Memory and buffer configuration in Kafka - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the buffer memory size in Kafka producer configuration.

Kafka
props.put("buffer.memory", [1]);
Drag options to blanks, or click blank then click option'
A33554432
B"buffer.memory"
C1024
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of a numeric value.
Setting too small a buffer size causing frequent blocking.
2fill in blank
medium

Complete the code to configure the batch size for Kafka producer buffers.

Kafka
props.put("batch.size", [1]);
Drag options to blanks, or click blank then click option'
A16384
B1000
C"batch.size"
Dtrue
Attempts:
3 left
💡 Hint
Common Mistakes
Using a string instead of an integer.
Setting batch size too large causing latency.
3fill in blank
hard

Fix the error in setting linger.ms to control buffer delay.

Kafka
props.put("linger.ms", [1]);
Drag options to blanks, or click blank then click option'
A"100"
B100
Ctrue
D"true"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing linger.ms as a string instead of an integer.
Using boolean values which are invalid.
4fill in blank
hard

Fill both blanks to configure buffer memory and batch size correctly.

Kafka
props.put("buffer.memory", [1]);
props.put("batch.size", [2]);
Drag options to blanks, or click blank then click option'
A33554432
B16384
C1000
D"buffer.memory"
Attempts:
3 left
💡 Hint
Common Mistakes
Using strings instead of integers.
Mixing up the values for buffer.memory and batch.size.
5fill in blank
hard

Fill all three blanks to configure buffer.memory, batch.size, and linger.ms properly.

Kafka
props.put("buffer.memory", [1]);
props.put("batch.size", [2]);
props.put("linger.ms", [3]);
Drag options to blanks, or click blank then click option'
A33554432
B16384
C100
D"100"
Attempts:
3 left
💡 Hint
Common Mistakes
Passing linger.ms as a string.
Using incorrect units or types for buffer.memory and batch.size.