Troubleshooting Flashcards

1
Q

Initialize transaction

A

producer = new KafkaProducer<>(conf);

producer.initTransactions();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Start transaction

A

producer.beginTransaction();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Wrap up transaction

A

producer. sendOffsetsToTransaction(getConsumedOffsets(consumer), consumer.groupMetadata());
producer. commitTransaction();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

wait for async calculations to complete

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Print Stream in one instruction

A

stream.print(Printed.toSysOut());

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Consume events sent to topic. Create a tumbling window with a size of 10 seconds without a grace period. Count the records, and print the KTable to the standard output.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Configure timeouts

A

props. put(ProducerConfig.DELIVERY_TIMEOUT_MS_CONFIG, 60000);
props. put(ProducerConfig.REQUEST_TIMEOUT_MS_CONFIG, 150);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Configure idempotence

A

props.put(ProducerConfig.ENABLE_IDEMPOTENCE_CONFIG, false);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Configure retries

A

props.put(ProducerConfig.RETRIES_CONFIG, 0);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Initiate topology test driver

A

testDriver = new TopologyTestDriver(tracker.buildTopology());

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Create input test topic

A

vehicleRegisteredTopic = testDriver.createInputTopic(topic, serializer1, serializer2);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Create test output topic

A

vehicleStatusTopic = testDriver.createOutputTopic(topic,deserializer1,deserializer2);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Create test store

A

vehiclesStore = testDriver.getKeyValueStore(“vehicles-store”);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Wrap up test with topology test driver

A

@AfterEach

public void tearDown() {

testDriver.close();

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

test that VehicleRegistered events create vehicles in the store

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Test events sent to output topic

A
17
Q

Implements exception test case

A
18
Q

implement VehicleRegistered test case

A