AsyncAPI for a whole Kafka cluster: topics, ACLs, groups and schemas
The full picture of a small platform in one document.

The recording shows kurkik kafka export on the demo sandbox; its data differs from this example.
Shown here: one broker. Other broker setups are further down.
Command
Section titled “Command”kurkik kafka export prod --acls --groupsThe AsyncAPI document
Section titled “The AsyncAPI document”asyncapi: 3.0.0info: title: prod Apache Kafka API version: 1.0.0-SNAPSHOT description: |- Generated by reading the prod cluster. Cluster id: MkU3OEVBNTcwNTJENDM2Qk.
Some of what this document describes could not be read, so it may be incomplete:
- No value schema is registered for payments.settled (expected subject payments.settled-value).servers: broker-1: host: kafka-1:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-1:19092,EXTERNAL://kafka-1:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "1" controller.listener.names: CONTROLLER controller.quorum.voters: 1@kafka-1:9093 group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" min.insync.replicas: "1" node.id: "1" offsets.topic.replication.factor: "1" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "1" clientConfiguration: bootstrap.servers: kafka-1:9092 security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {}channels: customers.updated: address: customers.updated messages: customers.updated-value: payload: schemaFormat: application/schema+json;version=draft-07 schema: $schema: http://json-schema.org/draft-07/schema# title: Customer type: object properties: id: type: string required: - id name: customers.updated-value title: customers.updated summary: "Schema read from the Apicurio Registry: subject customers.updated-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: NONE bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 1 topicConfiguration: cleanup.policy: - compact x-kurkik: kafka: channel: topic: customers.updated partitions: 3 replicas: 1 topicConfiguration: cleanup.policy: compact orders.created: address: orders.created messages: orders.created-value: payload: schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: OrderCreated namespace: com.shop.orders fields: - name: id type: string - name: total type: long name: orders.created-value title: orders.created summary: "Schema read from the Apicurio Registry: subject orders.created-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: BACKWARD bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 1 topicConfiguration: retention.ms: 604800000 x-kurkik: kafka: channel: topic: orders.created partitions: 3 replicas: 1 topicConfiguration: retention.ms: "604800000" payments.settled: address: payments.settled bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 1 x-kurkik: kafka: channel: topic: payments.settled partitions: 3 replicas: 1 topicConfiguration: min.insync.replicas: "1" retention.bytes: "10737418240"operations: receive_customers.updated: action: receive channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] consumerConfiguration: {} groupConfiguration: {} receive_orders.created: action: receive channel: $ref: "#/channels/orders.created" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:analytics - User:billing consumerConfiguration: {} groupConfiguration: {} receive_payments.settled: action: receive channel: $ref: "#/channels/payments.settled" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:billing consumerConfiguration: {} groupConfiguration: {} send_customers.updated: action: send channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] producerConfiguration: {} send_orders.created: action: send channel: $ref: "#/channels/orders.created" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {} send_payments.settled: action: send channel: $ref: "#/channels/payments.settled" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {}What to notice
Section titled “What to notice”- A group’s
stateandclientIdsare facts of the moment the document was made: export it whenbillingis stopped, and it isEMPTYwith no client ids. User:billingmay readorders.createdandpayments.settledand use the groupbilling. Onreceive_orders.createdit is listed besideUser:analytics, who may read everyorders.topic. The grant on thekafka-clusterresource is written too: every grant the cluster holds is inacl.
How to build this setup yourself
Brokers
Seed
kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic orders.created --partitions 3 --replication-factor 1 --config retention.ms=604800000kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic payments.settled --partitions 3 --replication-factor 1 --config min.insync.replicas=1 --config retention.bytes=10737418240kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic customers.updated --partitions 3 --replication-factor 1 --config cleanup.policy=compactkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic payments. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation IdempotentWrite --clusterkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:billing --operation Read --topic orders.created --topic payments.settled --group billingkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --group nightly-reportkafka-acls.sh --bootstrap-server kafka-1:9092 --add --deny-principal User:analytics --operation Read --topic customers.updatedkafka-consumer-groups.sh --bootstrap-server kafka-1:9092 --group nightly-report --topic orders.created:0 --reset-offsets --to-offset 0 --executekafka-console-consumer.sh --bootstrap-server kafka-1:9092 --group billing --consumer-property client.id=billing-1 --include 'orders.created|payments.settled' & # stays connected while kurkik readsRegistry
api=http://registry:8080/apis/ccompat/v7; type='Content-Type: application/vnd.schemaregistry.v1+json'curl -X POST -H "$type" "$api/subjects/orders.created-value/versions" --data '{"schemaType":"AVRO","schema":"{\"type\":\"record\",\"name\":\"OrderCreated\",\"namespace\":\"com.shop.orders\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"long\"}]}"}'curl -X POST -H "$type" "$api/subjects/customers.updated-key/versions" --data '{"schemaType":"AVRO","schema":"\"string\""}'curl -X POST -H "$type" "$api/subjects/customers.updated-value/versions" --data '{"schemaType":"JSON","schema":"{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Customer\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]}"}'curl -X PUT -H "$type" "$api/config/orders.created-value" --data '{"compatibility":"BACKWARD"}'Export
kurkik conn add kafka prod --bootstrap kafka-1:9092 --registry-url http://registry:8080 --registry-vendor apicuriokurkik kafka export prod --acls --groupsOther broker setups
Section titled “Other broker setups”Three brokers, alike
Section titled “Three brokers, alike”Show the document
asyncapi: 3.0.0info: title: prod Apache Kafka API version: 1.0.0-SNAPSHOT description: |- Generated by reading the prod cluster. Cluster id: MkU3OEVBNTcwNTJENDM2Qk.
Some of what this document describes could not be read, so it may be incomplete:
- No value schema is registered for payments.settled (expected subject payments.settled-value).servers: broker-1: host: kafka-1:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-1:19092,EXTERNAL://kafka-1:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "1" controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" min.insync.replicas: "1" node.id: "1" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {} broker-2: host: kafka-2:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-2:19092,EXTERNAL://kafka-2:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "2" controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" min.insync.replicas: "1" node.id: "2" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {} broker-3: host: kafka-3:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-3:19092,EXTERNAL://kafka-3:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "3" controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" min.insync.replicas: "1" node.id: "3" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {}channels: customers.updated: address: customers.updated messages: customers.updated-value: payload: schemaFormat: application/schema+json;version=draft-07 schema: $schema: http://json-schema.org/draft-07/schema# title: Customer type: object properties: id: type: string required: - id name: customers.updated-value title: customers.updated summary: "Schema read from the Apicurio Registry: subject customers.updated-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: NONE bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 3 topicConfiguration: cleanup.policy: - compact x-kurkik: kafka: channel: topic: customers.updated partitions: 3 replicas: 3 topicConfiguration: cleanup.policy: compact orders.created: address: orders.created messages: orders.created-value: payload: schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: OrderCreated namespace: com.shop.orders fields: - name: id type: string - name: total type: long name: orders.created-value title: orders.created summary: "Schema read from the Apicurio Registry: subject orders.created-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: BACKWARD bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 3 topicConfiguration: retention.ms: 604800000 x-kurkik: kafka: channel: topic: orders.created partitions: 3 replicas: 3 topicConfiguration: retention.ms: "604800000" payments.settled: address: payments.settled bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 3 x-kurkik: kafka: channel: topic: payments.settled partitions: 3 replicas: 3 topicConfiguration: min.insync.replicas: "1" retention.bytes: "10737418240"operations: receive_customers.updated: action: receive channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] consumerConfiguration: {} groupConfiguration: {} receive_orders.created: action: receive channel: $ref: "#/channels/orders.created" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:analytics - User:billing consumerConfiguration: {} groupConfiguration: {} receive_payments.settled: action: receive channel: $ref: "#/channels/payments.settled" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:billing consumerConfiguration: {} groupConfiguration: {} send_customers.updated: action: send channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] producerConfiguration: {} send_orders.created: action: send channel: $ref: "#/channels/orders.created" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {} send_payments.settled: action: send channel: $ref: "#/channels/payments.settled" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {}How to build this setup yourself
Brokers
Seed
kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic orders.created --partitions 3 --replication-factor 3 --config retention.ms=604800000kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic payments.settled --partitions 3 --replication-factor 3 --config min.insync.replicas=1 --config retention.bytes=10737418240kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic customers.updated --partitions 3 --replication-factor 3 --config cleanup.policy=compactkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic payments. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation IdempotentWrite --clusterkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:billing --operation Read --topic orders.created --topic payments.settled --group billingkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --group nightly-reportkafka-acls.sh --bootstrap-server kafka-1:9092 --add --deny-principal User:analytics --operation Read --topic customers.updatedkafka-consumer-groups.sh --bootstrap-server kafka-1:9092 --group nightly-report --topic orders.created:0 --reset-offsets --to-offset 0 --executekafka-console-consumer.sh --bootstrap-server kafka-1:9092 --group billing --consumer-property client.id=billing-1 --include 'orders.created|payments.settled' & # stays connected while kurkik readsRegistry
api=http://registry:8080/apis/ccompat/v7; type='Content-Type: application/vnd.schemaregistry.v1+json'curl -X POST -H "$type" "$api/subjects/orders.created-value/versions" --data '{"schemaType":"AVRO","schema":"{\"type\":\"record\",\"name\":\"OrderCreated\",\"namespace\":\"com.shop.orders\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"long\"}]}"}'curl -X POST -H "$type" "$api/subjects/customers.updated-key/versions" --data '{"schemaType":"AVRO","schema":"\"string\""}'curl -X POST -H "$type" "$api/subjects/customers.updated-value/versions" --data '{"schemaType":"JSON","schema":"{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Customer\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]}"}'curl -X PUT -H "$type" "$api/config/orders.created-value" --data '{"compatibility":"BACKWARD"}'Export
kurkik conn add kafka prod --bootstrap kafka-1:9092,kafka-2:9092,kafka-3:9092 --registry-url http://registry:8080 --registry-vendor apicuriokurkik kafka export prod --acls --groupsThree brokers that differ
Section titled “Three brokers that differ”Show the document
asyncapi: 3.0.0info: title: prod Apache Kafka API version: 1.0.0-SNAPSHOT description: |- Generated by reading the prod cluster. Cluster id: MkU3OEVBNTcwNTJENDM2Qk.
Some of what this document describes could not be read, so it may be incomplete:
- No value schema is registered for payments.settled (expected subject payments.settled-value).servers: broker-1: host: kafka-1:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-1:19092,EXTERNAL://kafka-1:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "1" broker.rack: zone-a controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" min.insync.replicas: "1" node.id: "1" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {} broker-2: host: kafka-2:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-2:19092,EXTERNAL://kafka-2:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "2" broker.rack: zone-b controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" log.cleaner.threads: "2" min.insync.replicas: "1" node.id: "2" num.network.threads: "5" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {} broker-3: host: kafka-3:9092 protocol: kafka protocolVersion: "4.4" bindings: kafka: bindingVersion: 0.5.0 schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio x-kurkik: kafka: server: schemaRegistryUrl: http://registry:8080 schemaRegistryVendor: apicurio security: - security: PLAINTEXT securityProtocol: PLAINTEXT acl: - principal: User:orders-service host: '*' operation: IDEMPOTENT_WRITE permission: ALLOW resourceType: CLUSTER patternType: LITERAL name: kafka-cluster - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: billing - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: GROUP patternType: LITERAL name: nightly-report - principal: User:analytics host: '*' operation: READ permission: DENY resourceType: TOPIC patternType: LITERAL name: customers.updated - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: orders.created - principal: User:billing host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: LITERAL name: payments.settled - principal: User:analytics host: '*' operation: READ permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: orders. - principal: User:orders-service host: '*' operation: WRITE permission: ALLOW resourceType: TOPIC patternType: PREFIXED name: payments. groups: - groupId: billing groupType: classic state: STABLE clientIds: - billing-1 topics: - orders.created - payments.settled configuration: {} - groupId: nightly-report groupType: classic state: EMPTY clientIds: [] topics: - orders.created configuration: {} brokerConfiguration: advertised.listeners: "INTERNAL://kafka-3:19092,EXTERNAL://kafka-3:9092" authorizer.class.name: org.apache.kafka.metadata.authorizer.StandardAuthorizer broker.id: "3" broker.rack: zone-c controller.listener.names: CONTROLLER controller.quorum.voters: "1@kafka-1:9093,2@kafka-2:9093,3@kafka-3:9093" group.initial.rebalance.delay.ms: "0" inter.broker.listener.name: INTERNAL listener.security.protocol.map: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" listeners: "INTERNAL://0.0.0.0:19092,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093" log.retention.hours: "72" min.insync.replicas: "1" node.id: "3" offsets.topic.replication.factor: "3" process.roles: "broker,controller" transaction.state.log.min.isr: "1" transaction.state.log.replication.factor: "3" clientConfiguration: bootstrap.servers: "kafka-1:9092,kafka-2:9092,kafka-3:9092" security.protocol: PLAINTEXT groupConfiguration: {} producerConfiguration: {} consumerConfiguration: {}channels: customers.updated: address: customers.updated servers: - $ref: "#/servers/broker-1" - $ref: "#/servers/broker-3" messages: customers.updated-value: payload: schemaFormat: application/schema+json;version=draft-07 schema: $schema: http://json-schema.org/draft-07/schema# title: Customer type: object properties: id: type: string required: - id name: customers.updated-value title: customers.updated summary: "Schema read from the Apicurio Registry: subject customers.updated-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: key: $ref: http://registry:8080/apis/registry/v2/groups/default/artifacts/customers.updated-key schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: NONE bindings: kafka: bindingVersion: 0.5.0 partitions: 1 replicas: 2 topicConfiguration: cleanup.policy: - compact x-kurkik: kafka: channel: topic: customers.updated partitions: 1 replicas: 2 topicConfiguration: cleanup.policy: compact orders.created: address: orders.created messages: orders.created-value: payload: schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: OrderCreated namespace: com.shop.orders fields: - name: id type: string - name: total type: long name: orders.created-value title: orders.created summary: "Schema read from the Apicurio Registry: subject orders.created-value,\ \ version 1." bindings: kafka: bindingVersion: 0.5.0 schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy x-kurkik: kafka: message: schemaIdLocation: header schemaLookupStrategy: TopicIdStrategy schemaCompatibility: BACKWARD bindings: kafka: bindingVersion: 0.5.0 partitions: 3 replicas: 3 topicConfiguration: retention.ms: 604800000 x-kurkik: kafka: channel: topic: orders.created partitions: 3 replicas: 3 topicConfiguration: retention.ms: "604800000" payments.settled: address: payments.settled servers: - $ref: "#/servers/broker-2" bindings: kafka: bindingVersion: 0.5.0 partitions: 2 replicas: 1 x-kurkik: kafka: channel: topic: payments.settled partitions: 2 replicas: 1 topicConfiguration: min.insync.replicas: "1" retention.bytes: "10737418240"operations: receive_customers.updated: action: receive channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] consumerConfiguration: {} groupConfiguration: {} receive_orders.created: action: receive channel: $ref: "#/channels/orders.created" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing - nightly-report clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:analytics - User:billing consumerConfiguration: {} groupConfiguration: {} receive_payments.settled: action: receive channel: $ref: "#/channels/payments.settled" bindings: kafka: bindingVersion: 0.5.0 groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 x-kurkik: kafka: operation: groupId: $schema: http://json-schema.org/draft-07/schema# enum: - billing clientId: $schema: http://json-schema.org/draft-07/schema# enum: - billing-1 security: - User:billing consumerConfiguration: {} groupConfiguration: {} send_customers.updated: action: send channel: $ref: "#/channels/customers.updated" x-kurkik: kafka: operation: security: [] producerConfiguration: {} send_orders.created: action: send channel: $ref: "#/channels/orders.created" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {} send_payments.settled: action: send channel: $ref: "#/channels/payments.settled" x-kurkik: kafka: operation: security: - User:orders-service producerConfiguration: {}How to build this setup yourself
Brokers
kafka-configs.sh --bootstrap-server kafka-1:9092 --entity-type brokers --entity-name 2 --alter --add-config log.cleaner.threads=2Seed
kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic orders.created --partitions 3 --replication-factor 3 --config retention.ms=604800000kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic payments.settled --replica-assignment 2,2 --config min.insync.replicas=1 --config retention.bytes=10737418240kafka-topics.sh --bootstrap-server kafka-1:9092 --create --topic customers.updated --replica-assignment 1:3 --config cleanup.policy=compactkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation Write --topic payments. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:orders-service --operation IdempotentWrite --clusterkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:billing --operation Read --topic orders.created --topic payments.settled --group billingkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --topic orders. --resource-pattern-type prefixedkafka-acls.sh --bootstrap-server kafka-1:9092 --add --allow-principal User:analytics --operation Read --group nightly-reportkafka-acls.sh --bootstrap-server kafka-1:9092 --add --deny-principal User:analytics --operation Read --topic customers.updatedkafka-consumer-groups.sh --bootstrap-server kafka-1:9092 --group nightly-report --topic orders.created:0 --reset-offsets --to-offset 0 --executekafka-console-consumer.sh --bootstrap-server kafka-1:9092 --group billing --consumer-property client.id=billing-1 --include 'orders.created|payments.settled' & # stays connected while kurkik readsRegistry
api=http://registry:8080/apis/ccompat/v7; type='Content-Type: application/vnd.schemaregistry.v1+json'curl -X POST -H "$type" "$api/subjects/orders.created-value/versions" --data '{"schemaType":"AVRO","schema":"{\"type\":\"record\",\"name\":\"OrderCreated\",\"namespace\":\"com.shop.orders\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"long\"}]}"}'curl -X POST -H "$type" "$api/subjects/customers.updated-key/versions" --data '{"schemaType":"AVRO","schema":"\"string\""}'curl -X POST -H "$type" "$api/subjects/customers.updated-value/versions" --data '{"schemaType":"JSON","schema":"{\"$schema\":\"http://json-schema.org/draft-07/schema#\",\"title\":\"Customer\",\"type\":\"object\",\"properties\":{\"id\":{\"type\":\"string\"}},\"required\":[\"id\"]}"}'curl -X PUT -H "$type" "$api/config/orders.created-value" --data '{"compatibility":"BACKWARD"}'Export
kurkik conn add kafka prod --bootstrap kafka-1:9092,kafka-2:9092,kafka-3:9092 --registry-url http://registry:8080 --registry-vendor apicuriokurkik kafka export prod --acls --groupsAll flags: kurkik kafka export · more Apache Kafka export examples
Copyright © 2026 Pavel Bodiachevskii