Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to create an ACL that allows a user to produce to a topic.
Kafka
kafka-acls --add --allow-principal User:[1] --operation Write --topic my-topic Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a user name not prefixed with 'User:'
Misspelling the user name
✗ Incorrect
The command adds an ACL allowing user 'alice' to write to 'my-topic'.
2fill in blank
mediumComplete the code to list all ACLs for a specific topic.
Kafka
kafka-acls --list --topic [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a topic name that does not exist
Omitting the --topic flag
✗ Incorrect
This command lists all ACLs set for the topic named 'my-topic'.
3fill in blank
hardFix the error in the command to remove an ACL for a user on a topic.
Kafka
kafka-acls --remove --allow-principal User:[1] --operation Read --topic my-topic Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Removing ACLs for the wrong user
Using incorrect operation names
✗ Incorrect
The command removes the ACL for user 'charlie' to read from 'my-topic'.
4fill in blank
hardFill both blanks to create an ACL that allows a user to consume from a topic.
Kafka
kafka-acls --add --allow-principal User:[1] --operation [2] --topic logs
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Write' instead of 'Read' for consuming
Incorrect user name format
✗ Incorrect
This command allows user 'eve' to read (consume) messages from the 'logs' topic.
5fill in blank
hardFill all three blanks to create an ACL that allows a user to describe a consumer group.
Kafka
kafka-acls --add --allow-principal User:[1] --operation [2] --group [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Delete' instead of 'Describe' for operation
Wrong group name or missing --group flag
✗ Incorrect
This command allows user 'grace' to describe the consumer group 'my-group'.