Export Pulsar Functions to AsyncAPI
Which topics each function reads and writes, in the document.

The recording shows kurkik pulsar export on the demo sandbox; its data differs from this example.
Shown here: one cluster. Other broker setups are further down.
Command
Section titled “Command”kurkik pulsar export standalone --consumersThe AsyncAPI document
Section titled “The AsyncAPI document”asyncapi: 3.0.0info: title: standalone Apache Pulsar API version: 1.0.0-SNAPSHOT description: Generated by reading Apache Pulsar of standalone (http://pulsar-standalone:8080).servers: standalone: host: pulsar-standalone: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://pulsar-standalone:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" security: - security: NONE tls: false consumers: - subscription: enrich type: Shared topics: - persistent://shop/orders/created processor: function shop/orders/enrich producers: [] functions: - tenant: shop namespace: orders name: enrich runtime: JAVA className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich inputs: - persistent://shop/orders/created output: persistent://shop/orders/enriched subscriptionName: enrich parallelism: 1 processingGuarantees: ATLEAST_ONCE channels: - $ref: "#/channels/persistent-shop-orders-created" - $ref: "#/channels/persistent-shop-orders-enriched" 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-standalone:6650 webServiceUrl: http://pulsar-standalone:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created messages: persistent-shop-orders-created: payload: type: string name: persistent-shop-orders-created title: persistent://shop/orders/created summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL 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-enriched: address: persistent://shop/orders/enriched messages: persistent-shop-orders-enriched: payload: type: string name: persistent-shop-orders-enriched title: persistent://shop/orders/enriched summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/orders/enriched 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 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"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: groupId: type: string enum: - enrich processors: - type: function name: shop/orders/enrich server: standalone consumerConfiguration: {} receive_persistent-shop-orders-enriched: action: receive channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: producerConfiguration: {} send_persistent-shop-orders-enriched: action: send channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: processors: - type: function name: shop/orders/enrich server: standalone producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: producerConfiguration: {}What to notice
Section titled “What to notice”- One server,
standalone, named after the cluster: a Pulsar cluster’s brokers share its metadata, so they are listed inx-kurkik.pulsar.server.brokers, not written as servers. - No channel has
servers: the one cluster holds every topic. x-kurkik.pulsar.server.functions:enrich, its class,inputs(created),output(enriched),subscriptionNameand thechannelsit touches.- On the operations,
processors:receive_...creatednames the function as a reader,send_...enrichedas a writer. Its subscriptionenrichjoins the receive operation’sgroupId. - The function’s instances connect with names that change on every restart: the subscription names the
processorinstead, and they are in noclientId.
How to build this setup yourself
Clusters
Seed
pulsar-admin tenants create shop --allowed-clusters standalone --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters standalonepulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2pulsar-admin functions create --tenant shop --namespace orders --name enrich --jar kurkik-pulsar-processors.jar \ --classname com.github.pakisan.kurkik.pulsar.fixtures.Enrich --inputs persistent://shop/orders/created \ --output persistent://shop/orders/enriched --subs-name enrichExport
kurkik conn add pulsar standalone --admin-url http://pulsar-standalone:8080 --service-url pulsar://pulsar-standalone:6650kurkik pulsar export standalone --consumersOther broker setups
Section titled “Other broker setups”Two geo-replicated clusters, alike
Section titled “Two geo-replicated clusters, alike”Show the document
asyncapi: 3.0.0info: title: east Apache Pulsar API version: 1.0.0-SNAPSHOT description: "Generated by reading Apache Pulsar of east (http://pulsar-east:8080),\ \ and the clusters it replicates with: west (http://pulsar-west:8080)."servers: east: host: pulsar-east:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster east. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: east brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-east:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" security: - security: NONE tls: false consumers: - subscription: enrich type: Shared topics: - persistent://shop/orders/created processor: function shop/orders/enrich producers: [] functions: - tenant: shop namespace: orders name: enrich runtime: JAVA className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich inputs: - persistent://shop/orders/created output: persistent://shop/orders/enriched subscriptionName: enrich parallelism: 1 processingGuarantees: ATLEAST_ONCE channels: - $ref: "#/channels/persistent-shop-orders-created" - $ref: "#/channels/persistent-shop-orders-enriched" sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: east 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-east:6650 webServiceUrl: http://pulsar-east:8080 producerConfiguration: {} consumerConfiguration: {} west: host: pulsar-west:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster west. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: west brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-west:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" security: - security: NONE tls: false consumers: - subscription: enrich type: Shared topics: - persistent://shop/orders/created processor: function shop/orders/enrich producers: [] functions: - tenant: shop namespace: orders name: enrich runtime: JAVA className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich inputs: - persistent://shop/orders/created output: persistent://shop/orders/enriched subscriptionName: enrich parallelism: 1 processingGuarantees: ATLEAST_ONCE channels: - $ref: "#/channels/persistent-shop-orders-created" - $ref: "#/channels/persistent-shop-orders-enriched" sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: west 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-west:6650 webServiceUrl: http://pulsar-west:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-orders-created: address: persistent://shop/orders/created messages: persistent-shop-orders-created: payload: type: string name: persistent-shop-orders-created title: persistent://shop/orders/created summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - east - west topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on" persistent-shop-orders-enriched: address: persistent://shop/orders/enriched messages: persistent-shop-orders-enriched: payload: type: string name: persistent-shop-orders-enriched title: persistent://shop/orders/enriched summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/enriched tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - east - west topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - east - west topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on"operations: receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: groupId: type: string enum: - enrich processors: - type: function name: shop/orders/enrich server: east - type: function name: shop/orders/enrich server: west consumerConfiguration: {} receive_persistent-shop-orders-enriched: action: receive channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: consumerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: producerConfiguration: {} send_persistent-shop-orders-enriched: action: send channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: processors: - type: function name: shop/orders/enrich server: east - type: function name: shop/orders/enrich server: west producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: producerConfiguration: {}How to build this setup yourself
Clusters
pulsar-admin --admin-url http://pulsar-east:8080 clusters create west --url http://pulsar-west:8080 --broker-url pulsar://pulsar-west:6650pulsar-admin --admin-url http://pulsar-west:8080 clusters create east --url http://pulsar-east:8080 --broker-url pulsar://pulsar-east:6650Seed
pulsar-admin tenants create shop --allowed-clusters east,west --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters east,westpulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2pulsar-admin functions create --tenant shop --namespace orders --name enrich --jar kurkik-pulsar-processors.jar \ --classname com.github.pakisan.kurkik.pulsar.fixtures.Enrich --inputs persistent://shop/orders/created \ --output persistent://shop/orders/enriched --subs-name enrichExport
kurkik conn add pulsar east --admin-url http://pulsar-east:8080 --service-url pulsar://pulsar-east:6650kurkik pulsar export east --consumersTwo geo-replicated clusters that differ
Section titled “Two geo-replicated clusters that differ”Show the document
asyncapi: 3.0.0info: title: east Apache Pulsar API version: 1.0.0-SNAPSHOT description: "Generated by reading Apache Pulsar of east (http://pulsar-east:8080),\ \ and the clusters it replicates with: west (http://pulsar-west:8080)."servers: east: host: pulsar-east:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster east. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: east brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-east:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/east-only: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" security: - security: NONE tls: false consumers: - subscription: enrich type: Shared topics: - persistent://shop/orders/created processor: function shop/orders/enrich producers: [] functions: - tenant: shop namespace: orders name: enrich runtime: JAVA className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich inputs: - persistent://shop/orders/created output: persistent://shop/orders/enriched subscriptionName: enrich parallelism: 1 processingGuarantees: ATLEAST_ONCE channels: - $ref: "#/channels/persistent-shop-orders-created" - $ref: "#/channels/persistent-shop-orders-enriched" sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: east 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-east:6650 webServiceUrl: http://pulsar-east:8080 producerConfiguration: {} consumerConfiguration: {} west: host: pulsar-west:6650 protocol: pulsar protocolVersion: "4.0" description: Apache Pulsar cluster west. bindings: pulsar: bindingVersion: 0.1.0 tenant: shop x-kurkik: pulsar: server: cluster: west brokers: - localhost:8080 schemaRegistryUrl: http://pulsar-west:8080 schemaRegistryVendor: pulsar namespacePolicies: public/default: schema-autoupdate: "on" shop/orders: schema-autoupdate: "on" shop/west-only: schema-autoupdate: "on" security: - security: NONE tls: false consumers: [] producers: [] functions: [] sources: [] sinks: [] brokerConfiguration: advertisedAddress: localhost backlogQuotaDefaultLimitGB: "10.0" bookkeeperClientMinNumRacksPerWriteQuorum: "1" bookkeeperClientReorderReadSequenceEnabled: "false" bookkeeperNumberOfChannelsPerBookie: "1" clusterName: west 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-west:6650 webServiceUrl: http://pulsar-west:8080 producerConfiguration: {} consumerConfiguration: {}channels: persistent-shop-east-only-records: address: persistent://shop/east-only/records servers: - $ref: "#/servers/east" bindings: pulsar: bindingVersion: 0.1.0 namespace: east-only persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/east-only/records tenant: shop namespace: east-only persistence: persistent partitions: 0 geo-replication: - east topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - east schema-autoupdate: "on" persistent-shop-orders-created: address: persistent://shop/orders/created messages: persistent-shop-orders-created: payload: type: string name: persistent-shop-orders-created title: persistent://shop/orders/created summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/created tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - east - west topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on" persistent-shop-orders-enriched: address: persistent://shop/orders/enriched messages: persistent-shop-orders-enriched: payload: type: string name: persistent-shop-orders-enriched title: persistent://shop/orders/enriched summary: "Schema read from Pulsar's own registry: STRING, version 0." x-kurkik: pulsar: message: schemaType: STRING schemaVersion: 0 schemaIdLocation: metadata schemaLookupStrategy: topic schemaCompatibility: FULL key: type: string bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/enriched tenant: shop namespace: orders persistence: persistent partitions: 0 geo-replication: - east - west topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on" persistent-shop-orders-paid: address: persistent://shop/orders/paid bindings: pulsar: bindingVersion: 0.1.0 namespace: orders persistence: persistent geo-replication: - east - west x-kurkik: pulsar: channel: topic: persistent://shop/orders/paid tenant: shop namespace: orders persistence: persistent partitions: 2 geo-replication: - east - west topicConfiguration: partitions: 2 persistence: persistent replication-clusters: - east - west schema-autoupdate: "on" persistent-shop-west-only-records: address: persistent://shop/west-only/records servers: - $ref: "#/servers/west" bindings: pulsar: bindingVersion: 0.1.0 namespace: west-only persistence: persistent x-kurkik: pulsar: channel: topic: persistent://shop/west-only/records tenant: shop namespace: west-only persistence: persistent partitions: 0 geo-replication: - west topicConfiguration: partitions: 0 persistence: persistent replication-clusters: - west schema-autoupdate: "on"operations: receive_persistent-shop-east-only-records: action: receive channel: $ref: "#/channels/persistent-shop-east-only-records" x-kurkik: pulsar: operation: consumerConfiguration: {} receive_persistent-shop-orders-created: action: receive channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: groupId: type: string enum: - enrich processors: - type: function name: shop/orders/enrich server: east consumerConfiguration: {} receive_persistent-shop-orders-enriched: action: receive channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: consumerConfiguration: {} receive_persistent-shop-orders-paid: action: receive channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: consumerConfiguration: {} receive_persistent-shop-west-only-records: action: receive channel: $ref: "#/channels/persistent-shop-west-only-records" x-kurkik: pulsar: operation: consumerConfiguration: {} send_persistent-shop-east-only-records: action: send channel: $ref: "#/channels/persistent-shop-east-only-records" x-kurkik: pulsar: operation: producerConfiguration: {} send_persistent-shop-orders-created: action: send channel: $ref: "#/channels/persistent-shop-orders-created" x-kurkik: pulsar: operation: producerConfiguration: {} send_persistent-shop-orders-enriched: action: send channel: $ref: "#/channels/persistent-shop-orders-enriched" x-kurkik: pulsar: operation: processors: - type: function name: shop/orders/enrich server: east producerConfiguration: {} send_persistent-shop-orders-paid: action: send channel: $ref: "#/channels/persistent-shop-orders-paid" x-kurkik: pulsar: operation: producerConfiguration: {} send_persistent-shop-west-only-records: action: send channel: $ref: "#/channels/persistent-shop-west-only-records" x-kurkik: pulsar: operation: producerConfiguration: {}How to build this setup yourself
Clusters
pulsar-admin --admin-url http://pulsar-east:8080 clusters create west --url http://pulsar-west:8080 --broker-url pulsar://pulsar-west:6650pulsar-admin --admin-url http://pulsar-west:8080 clusters create east --url http://pulsar-east:8080 --broker-url pulsar://pulsar-east:6650Seed
pulsar-admin tenants create shop --allowed-clusters east,west --admin-roles shop-adminpulsar-admin namespaces create shop/orders --clusters east,westpulsar-admin topics create persistent://shop/orders/createdpulsar-admin topics create-partitioned-topic persistent://shop/orders/paid --partitions 2pulsar-admin --admin-url http://pulsar-east:8080 namespaces create shop/east-only --clusters eastpulsar-admin --admin-url http://pulsar-east:8080 topics create persistent://shop/east-only/recordspulsar-admin --admin-url http://pulsar-west:8080 namespaces create shop/west-only --clusters westpulsar-admin --admin-url http://pulsar-west:8080 topics create persistent://shop/west-only/recordspulsar-admin functions create --tenant shop --namespace orders --name enrich --jar kurkik-pulsar-processors.jar \ --classname com.github.pakisan.kurkik.pulsar.fixtures.Enrich --inputs persistent://shop/orders/created \ --output persistent://shop/orders/enriched --subs-name enrichExport
kurkik conn add pulsar east --admin-url http://pulsar-east:8080 --service-url pulsar://pulsar-east:6650kurkik pulsar export east --consumersAll flags: kurkik pulsar export · more Apache Pulsar export examples
Copyright © 2026 Pavel Bodiachevskii