Skip to content

Kafka Connect and MirrorMaker Quiz ​

Review the chapter's Strimzi v1 configuration, actual plugins, replication and recovery conditions.

1. In which directions do Debezium PostgreSQL and an S3 sink move data? ​

Show answer

Debezium is a source that sends snapshot/WAL changes into Kafka; an S3 sink sends Kafka records to S3. Check each plugin's formats and delivery behavior.

2. Does archiving Debezium records with the Aiven S3 sink automatically reconstruct the current database table? ​

Show answer

No. The example archives CDC events with operation and before/after data. Materializing current state requires handling keys, deletes/tombstones, ordering and replay.

3. How do the distributed Connect group coordinator and worker leader differ? ​

Show answer

A Kafka broker coordinates the group; the elected worker leader computes assignments. Worker failure can trigger delayed reassignment and replay, and differs from a task failure.

4. Is standalone Connect impossible to run on Kubernetes? ​

Show answer

It can run there, but lacks distributed worker failover. Strimzi KafkaConnect manages distributed mode. More workers do not automatically parallelize a single-task connector.

5. What can happen when directly editing a connector through REST while KafkaConnector CRs manage it? ​

Show answer

The operator can reconcile it back to the CR's desired state. Use the CR as the mutation path and restrict Kubernetes updates and Connect REST access.

6. Which annotation enables KafkaConnector reconciliation, and what API version is used here? ​

Show answer

strimzi.io/use-connector-resources: "true" and kafka.strimzi.io/v1. The v1 migration includes fields such as groupId and internal topic names; changing apiVersion alone is insufficient.

7. What should be pinned and checked in spec.build, and how is ECR authentication handled? ​

Show answer

Specify plugin versions, URLs, checksums and an output image tag. Maintain a valid push Secret and image-pull permissions; ECR tokens expire after 12 hours. Runtime S3 identity and build-push authentication are separate.

8. What are MM2 offset-sync mappings and checkpoints for? ​

Show answer

MirrorSourceConnector emits source/target offset mappings; MirrorCheckpointConnector uses them to translate source group commits. Source and target offsets are not assumed to be equal.

9. How does DefaultReplicationPolicy name remote topics and detect cycles? ​

Show answer

It uses <source-alias>.<topic> and detects a cycle back to a target alias already in the origin chain. It does not exclude every prefixed topic; multi-hop replication to a third cluster can be legitimate.

10. What must be prepared beyond MM2 for active-passive failover? ​

Show answer

Fence old writers, measure replication/checkpoint freshness, verify target permissions and schemas, change endpoints/subscriptions and validate resumed positions. An unrecoverable source can lose unreplicated data; measure duplicate replay too.

11. Does an Apache MirrorHeartbeatTask heartbeat prove that source data replication is healthy? ​

Show answer

No. The task can emit a heartbeat without reading source data. Also inspect partition progress, errors and checkpoint freshness. Distinguish this Apache class from fields supported by Strimzi 1.2's v1 CRD.

12. What are Connect v1's internal topic fields and their partition/retention requirements? ​

Show answer

spec.configStorageTopic, spec.offsetStorageTopic and spec.statusStorageTopic. Use compaction and one partition for the config topic. Set the worker group with spec.groupId; sink group offsets are separate.

13. Does sync.topic.acls.enabled=true copy the entire source security policy unchanged? ​

Show answer

No. Kafka 4.3.1 processes selected literal topic ACLs, excludes ALLOW WRITE and downgrades ALLOW ALL to READ. It does not migrate all users, cluster policies or external IAM policies. The example manages target policies separately.

14. What matters when interpreting replication-latency-ms and cross-region compression? ​

Show answer

It measures target acknowledgement time minus record timestamp, affected by clock skew, timestamp mode and replay. Compression on a target-region worker's target producer does not reduce source fetch traffic that already crossed regions.

15. Where are target and source connections defined in KafkaMirrorMaker2 v1? ​

Show answer

spec.target and spec.mirrors[].source. The target requires alias, bootstrapServers, groupId and three internal topic names. Do not use the old connectCluster/clusters/heartbeatConnector structure.

16. Write the chapter's Debezium PostgreSQL KafkaConnector and describe its prerequisites. ​

Show answer
yaml
apiVersion: kafka.strimzi.io/v1
kind: KafkaConnector
metadata:
  name: orders-db-source
  namespace: kafka
  labels:
    strimzi.io/cluster: connect-cluster
spec:
  class: io.debezium.connector.postgresql.PostgresConnector
  tasksMax: 1
  config:
    database.hostname: orders-db.REPLACE.ap-northeast-2.rds.amazonaws.com
    database.port: 5432
    database.user: debezium
    database.password: "${dir:/mnt/debezium:password}"
    database.dbname: orders
    database.sslmode: verify-full
    database.sslrootcert: /mnt/rds-ca/ca.crt
    topic.prefix: orders-db
    plugin.name: pgoutput
    slot.name: debezium_orders
    publication.name: debezium_orders_pub
    publication.autocreate.mode: disabled
    table.include.list: 'public[.]orders,public[.]order_items'
    snapshot.mode: initial

Prepare logical replication, privileges, publication and suitable replica identity. Read the password through the allowed Secret-directory provider and verify the DB TLS hostname. It uses one task; monitor WAL retained by a stalled slot.

17. What are the key conditions for group-offset synchronization in the chapter's v1 MM2 example? ​

Show answer

Match source/checkpoint replication policy and offset-syncs location, enabling sync.group.offsets.enabled=true. Valid mappings/checkpoints and permissions are required, and the target group must be inactive or absent. Active consumers are not overwritten. Use the target/source structure in the chapter's mm2.yaml.

18. Do IdentityReplicationPolicy and topicsPattern make arbitrary bidirectional writes safe? ​

Show answer

No. Identity loses origin-prefix information and lacks the default policy's equivalent loop detection. Design directional topic ownership, filters, writer policies and cutover. Topic filters do not automatically resolve data conflicts or duplicates.


Return to learning material | Next quiz