Black Friday Special Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Question # 4

When is the onCompletion() method called?

private class ProducerCallback implements Callback {

@Override

public void onCompletion(RecordMetadata recordMetadata, Exception e) {

if (e != null) {

e.printStackTrace();

}

}

}

ProducerRecord record =

new ProducerRecord<>("topic1", "key1", "value1");

producer.send(record, new ProducerCallback());

A.

When the message is partitioned and batched successfully

B.

When message is serialized successfully

C.

When the broker response is received

D.

When send() method is called

Full Access
Question # 5

In Kafka Streams, by what value are internal topics prefixed by?

A.

tasks-

B.

application.id

C.

group.id

D.

kafka-streams-

Full Access
Question # 6

You are receiving orders from different customer in an "orders" topic with multiple partitions. Each message has the customer name as the key. There is a special customer named ABC that generates a lot of orders and you would like to reserve a partition exclusively for ABC. The rest of the message should be distributed among other partitions. How can this be achieved?

A.

Add metadata to the producer record

B.

Create a custom partitioner

C.

All messages with the same key will go the same partition, but the same partition may have messages with different keys. It is not possible to reserve

D.

Define a Kafka Broker routing rule

Full Access
Question # 7

In the Kafka consumer metrics it is observed that fetch-rate is very high and each fetch is small. What steps will you take to increase throughput?

A.

Increase fetch.max.wait

B.

Increase fetch.max.bytes

C.

Decrease fetch.max.bytes

D.

Decrease fetch.min.bytes

E.

Increase fetch.min.bytes

Full Access
Question # 8

What is returned by a producer.send() call in the Java API?

A.

Future object

B.

A Boolean indicating if the call succeeded

C.

Future object

D.

Unit

Full Access
Question # 9

You are using JDBC source connector to copy data from a table to Kafka topic. There is one connector created with max.tasks equal to 2 deployed on a cluster of 3 workers. How many tasks are launched?

A.

3

B.

2

C.

1

D.

6

Full Access
Question # 10

A producer application in a developer machine was able to send messages to a Kafka topic. After copying the producer application into another developer's machine, the producer is able to connect to Kafka but unable to produce to the same Kafka topic because of an authorization issue. What is the likely issue?

A.

Broker configuration needs to be changed to allow a different producer

B.

You cannot copy a producer application from one machine to another

C.

The Kafka ACL does not allow another machine IP

D.

The Kafka Broker needs to be rebooted

Full Access
Question # 11

You are running a Kafka Streams application in a Docker container managed by Kubernetes, and upon application restart, it takes a long time for the docker container to replicate the state and get back to processing the data. How can you improve dramatically the application restart?

A.

Mount a persistent volume for your RocksDB

B.

Increase the number of partitions in your inputs topic

C.

Reduce the Streams caching property

D.

Increase the number of Streams threads

Full Access
Question # 12

What Java library is KSQL based on?

A.

Kafka Streams

B.

REST Proxy

C.

Schema Registry

D.

Kafka Connect

Full Access
Question # 13

How can you gracefully make a Kafka consumer to stop immediately polling data from Kafka and gracefully shut down a consumer application?

A.

Call consumer.wakeUp() and catch a WakeUpException

B.

Call consumer.poll() in another thread

C.

Kill the consumer thread

Full Access
Question # 14

Which of the following errors are retriable from a producer perspective? (select two)

A.

MESSAGE_TOO_LARGE

B.

INVALID_REQUIRED_ACKS

C.

NOT_ENOUGH_REPLICAS

D.

NOT_LEADER_FOR_PARTITION

E.

TOPIC_AUTHORIZATION_FAILED

Full Access
Question # 15

Which of the following is true regarding thread safety in the Java Kafka Clients?

A.

One Producer can be safely used in multiple threads

B.

One Consumer can be safely used in multiple threads

C.

One Consumer needs to run in one thread

D.

One Producer needs to be run in one thread

Full Access
Question # 16

A Zookeeper configuration has tickTime of 2000, initLimit of 20 and syncLimit of 5. What's the timeout value for followers to connect to Zookeeper?

A.

20 sec

B.

10 sec

C.

2000 ms

D.

40 sec

Full Access
Question # 17

Where are KSQL-related data and metadata stored?

A.

Kafka Topics

B.

Zookeeper

C.

PostgreSQL database

D.

Schema Registry

Full Access
Question # 18

Consumer failed to process record # 10 and succeeded in processing record # 11. Select the course of action that you should choose to guarantee at least once processing

A.

Commit offsets at 10

B.

Do not commit until successfully processing the record #10

C.

Commit offsets at 11

Full Access
Question # 19

Which of the following is not an Avro primitive type?

A.

string

B.

long

C.

int

D.

date

E.

null

Full Access
Question # 20

By default, which replica will be elected as a partition leader? (select two)

A.

Preferred leader broker if it is in-sync and auto.leader.rebalance.enable=true

B.

Any of the replicas

C.

Preferred leader broker if it is in-sync and auto.leader.rebalance.enable=false

D.

An in-sync replica

Full Access
Question # 21

To prevent network-induced duplicates when producing to Kafka, I should use

A.

max.in.flight.requests.per.connection=1

B.

enable.idempotence=true

C.

retries=200000

D.

batch.size=1

Full Access
Question # 22

Where are the ACLs stored in a Kafka cluster by default?

A.

Inside the broker's data directory

B.

Under Zookeeper node /kafka-acl/

C.

In Kafka topic __kafka_acls

D.

Inside the Zookeeper's data directory

Full Access