Compare Apicurio schema versions for Pulsar
One registry is a version ahead.

The recording shows kurkik pulsar diff on the demo sandbox; its data differs from this example.
Command
Section titled “Command”kurkik pulsar diff a b --schemasOutput
Section titled “Output”a vs b
Schemas ~ persistent://shop/orders/created payload - The value schemas differ (v1 and v2). (a: v1 Avro, b: v2 Avro) ~ persistent://shop/orders/created structure - The structures differ in 1 field(s): note. (a: Avro, b: Avro) ~ persistent://shop/orders/created payload.note - note is only on b. (a: (absent), b: string, optional) ~ persistent://shop/orders/created versions - a has 1 version(s) and b 2. (a: 1, b: 2) + persistent://shop/orders/created version 2 - Version 2 (v2 Avro) is only on b. (b: v2 Avro) ~ persistent://shop/orders/paid payload - The value schemas differ (v1 and v2). (a: v1 JSON Schema, b: v2 JSON Schema) ~ persistent://shop/orders/paid structure - The structures differ in 1 field(s): at. (a: JSON Schema, b: JSON Schema) ~ persistent://shop/orders/paid payload.at - at is only on b. (a: (absent), b: integer, optional) ~ persistent://shop/orders/paid versions - a has 1 version(s) and b 2. (a: 1, b: 2) + persistent://shop/orders/paid version 2 - Version 2 (v2 JSON Schema) is only on b. (b: v2 JSON Schema) ~ persistent://shop/orders/shipped payload - The value schemas differ (v1 and v2). (a: v1 Protobuf, b: v2 Protobuf) ~ persistent://shop/orders/shipped structure - The structures differ in 1 field(s): note. (a: Protobuf, b: Protobuf) ~ persistent://shop/orders/shipped payload.note - note is only on b. (a: (absent), b: string, optional) ~ persistent://shop/orders/shipped versions - a has 1 version(s) and b 2. (a: 1, b: 2) + persistent://shop/orders/shipped version 2 - Version 2 (v2 Protobuf) is only on b. (b: v2 Protobuf)
Notes - Not compared: ACLs, consumers, functions, connectors, configuration. Add --acls --consumers --functions --connectors --configs, or --all, to compare them.
Drift: 12 changed · 3 unmanaged · 0 missing (drift) - 22 matched
exit 2Exit code 2: drift found, so a CI job can stop here.
| Mark | Means |
|---|---|
~ |
both sides have it, but it differs |
! |
only the first side has it |
+ |
only the second side has it |
Other ways to give a side
Section titled “Other ways to give a side”| Compare | Command | Result |
|---|---|---|
| two clusters | kurkik pulsar diff a b --schemas |
Drift: 12 changed · 3 unmanaged · 0 missing (drift) - 22 matched |
| a document and a cluster | kurkik pulsar diff a.yaml b --schemas |
Drift: 12 changed · 3 unmanaged · 0 missing (drift) - 22 matched |
| two documents | kurkik pulsar diff a.yaml b.yaml --schemas |
Drift: 12 changed · 3 unmanaged · 0 missing (drift) - 22 matched |
Download the JSON report (-o json)
The documents compared
Section titled “The documents compared”a.yaml, 285 lines
asyncapi: 3.0.0info: title: a Apache Pulsar API version: 1.0.0-SNAPSHOT description: Generated by reading Apache Pulsar of a (http://pulsar-a:8080).servers: standalone: host: pulsar-a:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster standalone. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: standalone brokers: - localhost:8080 schemaRegistryUrl: http://registry-a:8080 schemaRegistryVendor: apicurio namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" tenants: - tenant: public adminRoles: [] allowedClusters: - standalone - tenant: shop adminRoles: - shop-admin allowedClusters: - standalone security: - security: NONE tls: false acl: [] consumers: [] producers: [] functions: [] sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: standalone enablePackagesManagement: "true" forceDeleteNamespaceAllowed: "true" functionsWorkerEnablePackageManagement: "true" isRunningStandalone: "true" loadBalancerEnabled: "false" loadManagerClassName: org.apache.pulsar.broker.loadbalance.NoopLoadManager managedLedgerCacheEvictionFrequency: "100.0" managedLedgerDefaultAckQuorum: "1" managedLedgerDefaultEnsembleSize: "1" managedLedgerDefaultMarkDeleteRateLimit: "0.1" managedLedgerDefaultWriteQuorum: "1" metadataStoreUrl: rocksdb:///pulsar/data/metadata packagesManagementStorageProvider: org.apache.pulsar.packages.management.storage.filesystem.FileSystemPackagesStorageProvider statusFilePath: /usr/local/apache/htdocs topicPublisherThrottlingTickTimeMillis: "2" webSocketServiceEnabled: "true" clientConfiguration: serviceUrl: pulsar://pulsar-a:6650 webServiceUrl: http://pulsar-a:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created messages: persistent-shop-orders-created: payload: schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: Order namespace: shop fields: - name: id type: string - name: total type: double name: persistent-shop-orders-created title: persistent://shop/orders/created summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/created-value,\ \ version 1." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 1 schemaCompatibility: NONE key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid messages: persistent-shop-orders-paid: payload: schemaFormat: application/schema+json;version=draft-07 schema: type: object title: Payment properties: order: type: string paid: type: boolean required: - order - paid name: persistent-shop-orders-paid title: persistent://shop/orders/paid summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/paid-value,\ \ version 1." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 1 schemaCompatibility: NONE key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - standalone topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-shipped: address: persistent://shop/orders/shipped messages: persistent-shop-orders-shipped: payload: schemaFormat: application/vnd.google.protobuf;version=3 schema: | syntax = "proto3"; package shop;
message Shipment { string id = 1; string carrier = 2; } name: persistent-shop-orders-shipped title: persistent://shop/orders/shipped summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/shipped-value,\ \ version 1." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 1 schemaCompatibility: NONE key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/shipped tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} receive_persistent-shop-orders-shipped: action: receive channel: $ref: "#/channels/persistent-shop-orders-shipped" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: [] producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: [] producerConfiguration: {} send_persistent-shop-orders-shipped: action: send channel: $ref: "#/channels/persistent-shop-orders-shipped" x-kurkik: pulsar: operation: security: [] producerConfiguration: {}b.yaml, 372 lines
asyncapi: 3.0.0info: title: b Apache Pulsar API version: 1.0.0-SNAPSHOT description: Generated by reading Apache Pulsar of b (http://pulsar-b:8080).servers: standalone: host: pulsar-b:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster standalone. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: standalone brokers: - localhost:8080 schemaRegistryUrl: http://registry-b:8080 schemaRegistryVendor: apicurio namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" tenants: - tenant: public adminRoles: [] allowedClusters: - standalone - tenant: shop adminRoles: - shop-admin allowedClusters: - standalone security: - security: NONE tls: false acl: [] consumers: [] producers: [] functions: [] sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: standalone enablePackagesManagement: "true" forceDeleteNamespaceAllowed: "true" functionsWorkerEnablePackageManagement: "true" isRunningStandalone: "true" loadBalancerEnabled: "false" loadManagerClassName: org.apache.pulsar.broker.loadbalance.NoopLoadManager managedLedgerCacheEvictionFrequency: "100.0" managedLedgerDefaultAckQuorum: "1" managedLedgerDefaultEnsembleSize: "1" managedLedgerDefaultMarkDeleteRateLimit: "0.1" managedLedgerDefaultWriteQuorum: "1" metadataStoreUrl: rocksdb:///pulsar/data/metadata packagesManagementStorageProvider: org.apache.pulsar.packages.management.storage.filesystem.FileSystemPackagesStorageProvider statusFilePath: /usr/local/apache/htdocs topicPublisherThrottlingTickTimeMillis: "2" webSocketServiceEnabled: "true" clientConfiguration: serviceUrl: pulsar://pulsar-b:6650 webServiceUrl: http://pulsar-b:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created messages: persistent-shop-orders-created: payload: schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: Order namespace: shop fields: - name: id type: string - name: total type: double - name: note type: - "null" - string default: null name: persistent-shop-orders-created title: persistent://shop/orders/created summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/created-value,\ \ version 2." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 2 schemaCompatibility: NONE schemaVersions: - version: 1 schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: Order namespace: shop fields: - name: id type: string - name: total type: double - version: 2 schemaFormat: application/vnd.apache.avro;version=1.9.0 schema: type: record name: Order namespace: shop fields: - name: id type: string - name: total type: double - name: note type: - "null" - string default: null key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid messages: persistent-shop-orders-paid: payload: schemaFormat: application/schema+json;version=draft-07 schema: type: object title: Payment properties: order: type: string paid: type: boolean at: type: integer required: - order - paid name: persistent-shop-orders-paid title: persistent://shop/orders/paid summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/paid-value,\ \ version 2." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 2 schemaCompatibility: NONE schemaVersions: - version: 1 schemaFormat: application/schema+json;version=draft-07 schema: type: object title: Payment properties: order: type: string paid: type: boolean required: - order - paid - version: 2 schemaFormat: application/schema+json;version=draft-07 schema: type: object title: Payment properties: order: type: string paid: type: boolean at: type: integer required: - order - paid key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - standalone topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on" persistent-shop-orders-shipped: address: persistent://shop/orders/shipped messages: persistent-shop-orders-shipped: payload: schemaFormat: application/vnd.google.protobuf;version=3 schema: | syntax = "proto3"; package shop;
message Shipment { string id = 1; string carrier = 2; optional string note = 3; } name: persistent-shop-orders-shipped title: persistent://shop/orders/shipped summary: "Schema read from the Apicurio Registry: artifact persistent://shop/orders/shipped-value,\ \ version 2." x-kurkik: pulsar: message: schemaType: NONE schemaIdLocation: payload schemaIdPayloadEncoding: apicurio-new schemaLookupStrategy: TopicIdStrategy schemaVersion: 2 schemaCompatibility: NONE schemaVersions: - version: 1 schemaFormat: application/vnd.google.protobuf;version=3 schema: | syntax = "proto3"; package shop;
message Shipment { string id = 1; string carrier = 2; } - version: 2 schemaFormat: application/vnd.google.protobuf;version=3 schema: | syntax = "proto3"; package shop;
message Shipment { string id = 1; string carrier = 2; optional string note = 3; } key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/shipped tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - standalone topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - standalone schema-autoupdate: "on"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} receive_persistent-shop-orders-shipped: action: receive channel: $ref: "#/channels/persistent-shop-orders-shipped" x-kurkik: pulsar: operation: security: [] consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: security: [] producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: security: [] producerConfiguration: {} send_persistent-shop-orders-shipped: action: send channel: $ref: "#/channels/persistent-shop-orders-shipped" x-kurkik: pulsar: operation: security: [] producerConfiguration: {}How to build this setup yourself
Clusters
Fixture
pulsar-admin tenants create shop --allowed-clusters <its cluster> --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters <its cluster>pulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2Side a
pulsar-admin --admin-url http://pulsar-a:8080 topics create persistent://shop/orders/shippedpulsar-admin --admin-url http://pulsar-a:8080 schemas upload persistent://shop/orders/created -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onepulsar-admin --admin-url http://pulsar-a:8080 schemas upload persistent://shop/orders/paid -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onepulsar-admin --admin-url http://pulsar-a:8080 schemas upload persistent://shop/orders/shipped -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onecurl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-a:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fcreated-value/versions -d '{"schema":"{\"type\":\"record\",\"name\":\"Order\",\"namespace\":\"shop\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"double\"}]}"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-a:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fpaid-value/versions -d '{"schema":"{\"type\":\"object\",\"title\":\"Payment\",\"properties\":{\"order\":{\"type\":\"string\"},\"paid\":{\"type\":\"boolean\"}},\"required\":[\"order\",\"paid\"]}","schemaType":"JSON"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-a:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fshipped-value/versions -d '{"schema":"syntax = \"proto3\";\npackage shop;\n\nmessage Shipment {\n string id = 1;\n string carrier = 2;\n}\n","schemaType":"PROTOBUF"}'Side b
pulsar-admin --admin-url http://pulsar-b:8080 topics create persistent://shop/orders/shippedpulsar-admin --admin-url http://pulsar-b:8080 schemas upload persistent://shop/orders/created -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onepulsar-admin --admin-url http://pulsar-b:8080 schemas upload persistent://shop/orders/paid -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onepulsar-admin --admin-url http://pulsar-b:8080 schemas upload persistent://shop/orders/shipped -f bytes.json # {"type": "BYTES", "schema": ""}: the topic's own schema says bytes; the registry holds the real onecurl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fcreated-value/versions -d '{"schema":"{\"type\":\"record\",\"name\":\"Order\",\"namespace\":\"shop\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"double\"}]}"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fpaid-value/versions -d '{"schema":"{\"type\":\"object\",\"title\":\"Payment\",\"properties\":{\"order\":{\"type\":\"string\"},\"paid\":{\"type\":\"boolean\"}},\"required\":[\"order\",\"paid\"]}","schemaType":"JSON"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fshipped-value/versions -d '{"schema":"syntax = \"proto3\";\npackage shop;\n\nmessage Shipment {\n string id = 1;\n string carrier = 2;\n}\n","schemaType":"PROTOBUF"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fcreated-value/versions -d '{"schema":"{\"type\":\"record\",\"name\":\"Order\",\"namespace\":\"shop\",\"fields\":[{\"name\":\"id\",\"type\":\"string\"},{\"name\":\"total\",\"type\":\"double\"},{\"name\":\"note\",\"type\":[\"null\",\"string\"],\"default\":null}]}"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fpaid-value/versions -d '{"schema":"{\"type\":\"object\",\"title\":\"Payment\",\"properties\":{\"order\":{\"type\":\"string\"},\"paid\":{\"type\":\"boolean\"},\"at\":{\"type\":\"integer\"}},\"required\":[\"order\",\"paid\"]}","schemaType":"JSON"}'curl -X POST -H 'Content-Type: application/vnd.schemaregistry.v1+json' http://registry-b:8080/apis/ccompat/v7/subjects/persistent%3A%2F%2Fshop%2Forders%2Fshipped-value/versions -d '{"schema":"syntax = \"proto3\";\npackage shop;\n\nmessage Shipment {\n string id = 1;\n string carrier = 2;\n optional string note = 3;\n}\n","schemaType":"PROTOBUF"}'Compare
kurkik conn add pulsar a --admin-url http://pulsar-a:8080 --service-url pulsar://pulsar-a:6650 --apicurio-url http://registry-a:8080kurkik conn add pulsar b --admin-url http://pulsar-b:8080 --service-url pulsar://pulsar-b:6650 --apicurio-url http://registry-b:8080kurkik pulsar export a --this-cluster-only --acls --consumers --stdout > a.yamlkurkik pulsar export b --this-cluster-only --acls --consumers --stdout > b.yamlkurkik pulsar diff a b --schemas # cluster-vs-clusterkurkik pulsar diff a.yaml b --schemas # document-vs-clusterkurkik pulsar diff a.yaml b.yaml --schemas # document-vs-documentAll flags: kurkik pulsar diff · more Apache Pulsar diff examples
Copyright © 2026 Pavel Bodiachevskii