Post

Moving Apache Pulsar to a New Cluster Without Losing Functions, Sources and Sinks

Pulsar migration you can run: export permissions, functions, sources, sinks, schemas and namespace policies into one AsyncAPI document, compare clusters, sync the new one, and analyse it with an AI agent over MCP

Moving Apache Pulsar to a New Cluster Without Losing Functions, Sources and Sinks

Moving Pulsar looks simple until you list what lives inside it:

  • ⚡ Functions that someone deployed from a laptop last spring
  • 🔌 Sources and sinks quietly moving data in and out
  • 🔐 Permissions on namespaces and topics
  • ⚙️ Policies: retention, TTL, deduplication, backlog quotas, schema compatibility

Kurkik writes all of it into one AsyncAPI document you can compare with and sync from

1
curl -fsSL https://kurkik.pavelon.dev/install.sh | sh

The scenario

Two clusters from the demo sandbox: shop-prod is the old home, shop-dr is the new one. The new cluster has the shop/orders namespace and not much else: no policies, no permissions, no processors, 8 partitions where there should be 6, and a leftover legacy topic

I added to the demo for this post: an audit-log sink on shop-prod, and package management on shop-dr

Step 1: say which package each processor runs

This is the part everybody misses. Pulsar never tells which package a function, source or sink was deployed from. So write it down once, in packages.txt (your build pipeline knows it):

1
2
3
4
function:shop/orders/enrich=function://shop/orders/enrich@1
function:shop/orders/normalise=function://shop/orders/normalise@1
source:shop/orders/ticks=source://shop/orders/ticks@1
sink:shop/orders/audit-log=sink://shop/orders/audit-log@1

And publish those packages to the new cluster, for example:

1
pulsar-admin packages upload function://shop/orders/enrich@1 --path processors.jar --description enrich

Step 2: write the old cluster down

1
kurkik pulsar export shop-prod --acls --consumers --packages packages.txt

The servers part keeps policies, permissions, functions and sinks:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
servers:
  standalone:
    host: localhost:6650
    protocol: pulsar
    protocolVersion: "5.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://localhost:28080
          schemaRegistryVendor: pulsar
          namespacePolicies:
            public/default:
              schema-autoupdate: "on"
            shop/orders:
              backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
              deduplication: true
              message-ttl: 600
              retention:
                timeInMinutes: 60
                sizeInMB: 1024
              schema-autoupdate: "on"
              schema-compatibility-strategy: BACKWARD
          # ... tenants and security ...
          acl:
          - role: billing
            resourceType: namespace
            name: shop/orders
            actions:
            - consume
          - role: checkout
            resourceType: namespace
            name: shop/orders
            actions:
            - produce
          - role: audit
            resourceType: topic
            name: persistent://shop/orders/created
            actions:
            - consume
          # ... subscriptions ...
          functions:
          - tenant: shop
            namespace: orders
            name: enrich
            runtime: JAVA
            className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich
            archive: function://shop/orders/enrich@1
            inputs:
            - persistent://shop/orders/created
            output: persistent://shop/orders/enriched
            subscriptionName: enrich
            parallelism: 2
            processingGuarantees: ATLEAST_ONCE
          # ... the normalise function and the ticks source ...
          sinks:
          - tenant: shop
            namespace: orders
            name: audit-log
            className: com.github.pakisan.kurkik.pulsar.fixtures.AuditLog
            archive: sink://shop/orders/audit-log@1
            inputs:
            - persistent://shop/orders/enriched
            subscriptionName: audit-log
            parallelism: 1
            processingGuarantees: ATLEAST_ONCE
          # ... broker settings ...

In channels, each topic keeps its schema and policies:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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: OrderCreated
            namespace: com.shop
            fields:
            - name: id
              type: string
            - name: total
              type: long
        name: persistent-shop-orders-created
        title: persistent://shop/orders/created
        summary: "Schema read from Pulsar's own registry: AVRO, version 0."
        x-kurkik:
          pulsar:
            message:
              schemaType: AVRO
              schemaVersion: 0
              schemaIdLocation: metadata
              schemaLookupStrategy: topic
              schemaCompatibility: BACKWARD
              key:
                type: string
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true

The whole document is at the end

Step 3: look for yourself

1
kurkik pulsar scan shop-prod --acls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
shop-prod - Apache Pulsar 5.0.0, clusters standalone
public
  default
pulsar
shop
  orders
    grants billing: consume
    grants checkout: produce
    created  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
      grants audit: consume
      read by function shop/orders/enrich
    enriched  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
      written by function shop/orders/enrich
      read by sink shop/orders/audit-log
    normalised  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
      written by function shop/orders/normalise
    paid  6 partition(s), retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
    raw  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
      read by function shop/orders/normalise
    refunds  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
    ticks  retention 60m/1024MB, ttl 600s, deduplication on, replicated to standalone
      written by source shop/orders/ticks
    fn enrich  shop/orders/created → shop/orders/enriched  (sub: enrich)
    fn normalise  shop/orders/raw → shop/orders/normalised  (sub: normalise)
    source ticks  → shop/orders/ticks
    sink audit-log  ← shop/orders/enriched  (sub: audit-log)
subscriptions: not read (--consumers)
1
kurkik pulsar diff shop-prod shop-dr --all
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
shop-prod vs shop-dr

Topics
  ! persistent://shop/orders/created topic - Topic persistent://shop/orders/created is not on shop-dr. (shop-prod: persistent://shop/orders/created)
  ! persistent://shop/orders/enriched topic - Topic persistent://shop/orders/enriched is not on shop-dr. (shop-prod: persistent://shop/orders/enriched)
  + persistent://shop/orders/legacy topic - Topic persistent://shop/orders/legacy is not on shop-prod. (shop-dr: persistent://shop/orders/legacy)
  ! persistent://shop/orders/normalised topic - Topic persistent://shop/orders/normalised is not on shop-dr. (shop-prod: persistent://shop/orders/normalised)
  ! persistent://shop/orders/raw topic - Topic persistent://shop/orders/raw is not on shop-dr. (shop-prod: persistent://shop/orders/raw)
  ! persistent://shop/orders/refunds topic - Topic persistent://shop/orders/refunds is not on shop-dr. (shop-prod: persistent://shop/orders/refunds)
  ! persistent://shop/orders/ticks topic - Topic persistent://shop/orders/ticks is not on shop-dr. (shop-prod: persistent://shop/orders/ticks)

Partitions and persistence
  ~ persistent://shop/orders/paid partitions - Its partitions differ. (shop-prod: 6, shop-dr: 8)

Namespace policies
  ~ shop/orders backlog-quota destination_storage - shop/orders sets backlog-quota destination_storage on shop-prod and not on shop-dr. (shop-prod: limit 536870912 bytes, producer_request_hold, shop-dr: (not set))
  ~ shop/orders deduplication - shop/orders sets deduplication on shop-prod and not on shop-dr. (shop-prod: true, shop-dr: (not set))
  ~ shop/orders message-ttl - shop/orders sets message-ttl on shop-prod and not on shop-dr. (shop-prod: 600, shop-dr: (not set))
  ~ shop/orders retention - shop/orders sets retention on shop-prod and not on shop-dr. (shop-prod: timeInMinutes=60, sizeInMB=1024, shop-dr: (not set))
  ~ shop/orders schema-compatibility-strategy - shop/orders sets schema-compatibility-strategy on shop-prod and not on shop-dr. (shop-prod: BACKWARD, shop-dr: (not set))

Topic policies
  ~ persistent://shop/orders/paid backlog-quota destination_storage - backlog-quota destination_storage is in force on shop-prod and not set on shop-dr. (shop-prod: limit 536870912 bytes, producer_request_hold, shop-dr: (not set))
  ~ persistent://shop/orders/paid deduplication - deduplication is in force on shop-prod and not set on shop-dr. (shop-prod: true, shop-dr: (not set))
  ~ persistent://shop/orders/paid message-ttl - message-ttl is in force on shop-prod and not set on shop-dr. (shop-prod: 600, shop-dr: (not set))
  ~ persistent://shop/orders/paid retention - retention is in force on shop-prod and not set on shop-dr. (shop-prod: timeInMinutes=60, sizeInMB=1024, shop-dr: (not set))
  ~ persistent://shop/orders/paid schema-compatibility-strategy - schema-compatibility-strategy is in force on shop-prod and not set on shop-dr. (shop-prod: BACKWARD, shop-dr: (not set))

Subscriptions
  ! audit subscription - Subscription audit is on shop-prod and not on shop-dr. (shop-prod: audit)
  ! audit-log subscription - Subscription audit-log is on shop-prod and not on shop-dr. (shop-prod: audit-log)
  ! billing subscription - Subscription billing is on shop-prod and not on shop-dr. (shop-prod: billing)
  ! normalise subscription - Subscription normalise is on shop-prod and not on shop-dr. (shop-prod: normalise)

Functions, sources and sinks
  ! function shop/orders/enrich function - The function shop/orders/enrich runs on shop-prod and not on shop-dr. (shop-prod: shop/orders/enrich)
  ! function shop/orders/normalise function - The function shop/orders/normalise runs on shop-prod and not on shop-dr. (shop-prod: shop/orders/normalise)
  ! source shop/orders/ticks source - The source shop/orders/ticks runs on shop-prod and not on shop-dr. (shop-prod: shop/orders/ticks)
  ! sink shop/orders/audit-log sink - The sink shop/orders/audit-log runs on shop-prod and not on shop-dr. (shop-prod: shop/orders/audit-log)

ACLs
  ! audit - shop-prod grants audit consume on topic persistent://shop/orders/created; shop-dr does not.
  ! billing - shop-prod grants billing consume on namespace shop/orders; shop-dr does not.
  ! checkout - shop-prod grants checkout produce on namespace shop/orders; shop-dr does not.

Notes
  - Broker settings that name a machine or a cluster were not compared: advertisedAddress, clusterName, metadataStoreUrl, statusFilePath.

Drift: 11 changed · 1 unmanaged · 17 missing (drift) - 33 matched

Step 4: plan, apply, check

1
2
kurkik pulsar sync shop-prod-pulsar.yaml shop-dr --all --overwrite --force \
  --delete-topic persistent://shop/orders/legacy --dry-run

Read the plan. Here it recreates paid (its messages are lost) and deletes legacy, because I asked with --force and --delete-topic. Without those flags it leaves them alone

Then run it without --dry-run:

Terminal recording: kurkik pulsar export, diff, sync and diff again between two Pulsar clusters

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
applied
  [+] done          grant shop/orders  billing (not set) -> consume
  [+] done          grant shop/orders  checkout (not set) -> produce
  [+] done          set shop/orders  backlog-quota destination_storage (not set) -> limit 536870912 bytes, producer_request_hold
  [+] done          set shop/orders  deduplication (not set) -> true
  [+] done          set shop/orders  message-ttl (not set) -> 600
  [+] done          set shop/orders  schema-compatibility-strategy (not set) -> BACKWARD
  [+] done          set shop/orders  retention (not set) -> timeInMinutes=60, sizeInMB=1024
  [+] done          create persistent://shop/orders/created
  [+] done          create persistent://shop/orders/enriched
  [+] done          create persistent://shop/orders/normalised
  [+] done          create persistent://shop/orders/raw
  [+] done          create persistent://shop/orders/refunds
  [+] done          create persistent://shop/orders/ticks
  [+] done          recreate persistent://shop/orders/paid  partitions 8 -> 6
  [+] done          delete persistent://shop/orders/legacy
  [+] done          grant persistent://shop/orders/created  audit (not set) -> consume
  [+] done          register persistent://shop/orders/created  schema (not set) -> AVRO
  [+] done          register persistent://shop/orders/enriched  schema (not set) -> STRING
  [+] done          register persistent://shop/orders/ticks  schema (not set) -> STRING
  [+] done          deploy function shop/orders/enrich  function (not set) -> shop/orders/enrich
  [+] done          deploy function shop/orders/normalise  function (not set) -> shop/orders/normalise
  [+] done          deploy source shop/orders/ticks  source (not set) -> shop/orders/ticks
  [+] done          deploy sink shop/orders/audit-log  sink (not set) -> shop/orders/audit-log

Applied 23 of 23 changes
1
kurkik pulsar diff shop-prod shop-dr --all
1
2
3
4
5
6
7
8
9
10
shop-prod vs shop-dr

Schemas
  + persistent://shop/orders/normalised schema - shop-dr has a schema for persistent://shop/orders/normalised (STRING); shop-prod has none. (shop-dr: STRING)
  + persistent://shop/orders/raw schema - shop-dr has a schema for persistent://shop/orders/raw (STRING); shop-prod has none. (shop-dr: STRING)

Notes
  - Broker settings that name a machine or a cluster were not compared: advertisedAddress, clusterName, metadataStoreUrl, statusFilePath.

Drift: 0 changed · 2 unmanaged · 0 missing (no drift) - 168 matched

No drift. The two extra schemas on the new cluster are listed, so you know about them

Good to know:

  • Messages and subscription positions don’t move
  • A function’s user configuration and secrets are not in the document. Set them yourself
  • The demo cluster has authorization off, so it stores permissions without enforcing them
  • kurkik pulsar sync history shop-dr and sync revert undo a sync. Deleted messages stay deleted

Let your AI agent do the homework

kurkik mcp gives an AI agent Kurkik’s tools over MCP. They read and compare. They can’t apply anything

With Claude Code it is one line:

1
claude mcp add kurkik -- kurkik mcp

I used Junie for this post. Put this in your project’s .junie/mcp/mcp.json:

1
2
3
4
5
{
  "mcpServers": {
    "kurkik": { "command": "kurkik", "args": ["mcp"] }
  }
}

Then give it the job. This is the exact task from the recording:

1
We are moving from the Pulsar connection "shop-prod" (old) to "shop-dr" (new). Use only the kurkik MCP tools: no terminal commands, no reading files. First list the connections. Compare shop-prod (expected) with shop-dr (actual), areas all. Export shop-prod to the workspace with these packages: function:shop/orders/enrich=function://shop/orders/enrich@1, function:shop/orders/normalise=function://shop/orders/normalise@1, source:shop/orders/ticks=source://shop/orders/ticks@1, sink:shop/orders/audit-log=sink://shop/orders/audit-log@1, with consumers read. Then ask for a sync plan of that document into shop-dr, areas all, overwrite on, force on. Do not apply anything. Finish with a short migration report in plain markdown, at most 35 lines: what differs, what to migrate, what sync will not do, what a person still has to check by hand, and the command to run.

Terminal recording: an AI agent compares two Pulsar clusters through Kurkik MCP tools and writes a migration report

The recording is a real run, played back three times faster. Start-up errors from unrelated MCP servers on my machine are cut out

Here is the report it wrote:

Migration assessment complete; nothing was applied

Changes

  • DR lacks topics created, enriched, normalised, raw, refunds, ticks; subscriptions audit, audit-log, billing, normalise; and four processors
  • Namespace and inherited paid policies differ; paid has 8 partitions versus 6. DR-only legacy will remain
  • The plan sets policies, creates six topics, registers three schemas, and deploys enrich, normalise, ticks, and audit-log

Verification

  • Complete comparison: 11 changed, 14 missing, one DR-only. Export: asyncapi/shop-prod-pulsar.json; complete dry-run plan: 19 changes
  • Destructive: recreating paid loses messages and subscription positions; 600-second TTL can expire messages, including on other inheriting topics

Notes

  • The plan does not transfer message or cursor history, sync ACLs, or set processor configuration and secrets. Check these, package availability, broker settings, subscription positions, cutover, permissions and the function worker by hand
  • Person-run command, as reported by the tool; ensure the exported document resolves from the working directory: kurkik pulsar sync shop-prod-pulsar.json shop-dr --configs --consumers --schemas --functions --connectors --overwrite --force --expect-plan c1a6d7bec85a

The agent’s export lands in the asyncapi/ folder, so run its command from there. --expect-plan makes sure you apply exactly the plan it looked at, and nothing newer

Remember that permissions never reach the agent. It can reason about topics, policies, schemas, functions and connectors. Check access yourself with diff --all or scan --acls

The whole document

The whole document: shop-prod-pulsar.yaml (691 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
asyncapi: 3.0.0
info:
  title: shop-prod Apache Pulsar API
  version: 1.0.0-SNAPSHOT
  description: Generated by reading Apache Pulsar of shop-prod (http://localhost:28080).
servers:
  standalone:
    host: localhost:6650
    protocol: pulsar
    protocolVersion: "5.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://localhost:28080
          schemaRegistryVendor: pulsar
          namespacePolicies:
            public/default:
              schema-autoupdate: "on"
            shop/orders:
              backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
              deduplication: true
              message-ttl: 600
              retention:
                timeInMinutes: 60
                sizeInMB: 1024
              schema-autoupdate: "on"
              schema-compatibility-strategy: BACKWARD
          tenants:
          - tenant: public
            adminRoles: []
            allowedClusters:
            - standalone
          - tenant: shop
            adminRoles: []
            allowedClusters:
            - standalone
          security:
          - security: NONE
            tls: false
          acl:
          - role: billing
            resourceType: namespace
            name: shop/orders
            actions:
            - consume
          - role: checkout
            resourceType: namespace
            name: shop/orders
            actions:
            - produce
          - role: audit
            resourceType: topic
            name: persistent://shop/orders/created
            actions:
            - consume
          consumers:
          - subscription: audit
            topics:
            - persistent://shop/orders/created
            consumers: []
          - subscription: audit-log
            type: Shared
            topics:
            - persistent://shop/orders/enriched
            processor: sink shop/orders/audit-log
          - subscription: billing
            topics:
            - persistent://shop/orders/created
            consumers: []
          - subscription: normalise
            type: Shared
            topics:
            - persistent://shop/orders/raw
            processor: function shop/orders/normalise
          producers: []
          functions:
          - tenant: shop
            namespace: orders
            name: enrich
            runtime: JAVA
            className: com.github.pakisan.kurkik.pulsar.fixtures.Enrich
            archive: function://shop/orders/enrich@1
            inputs:
            - persistent://shop/orders/created
            output: persistent://shop/orders/enriched
            subscriptionName: enrich
            parallelism: 2
            processingGuarantees: ATLEAST_ONCE
            channels:
            - $ref: "#/channels/persistent-shop-orders-created"
            - $ref: "#/channels/persistent-shop-orders-enriched"
            roles: []
          - tenant: shop
            namespace: orders
            name: normalise
            runtime: JAVA
            className: com.github.pakisan.kurkik.pulsar.fixtures.Normalise
            archive: function://shop/orders/normalise@1
            inputs:
            - persistent://shop/orders/raw
            output: persistent://shop/orders/normalised
            subscriptionName: normalise
            parallelism: 1
            processingGuarantees: ATLEAST_ONCE
            channels:
            - $ref: "#/channels/persistent-shop-orders-raw"
            - $ref: "#/channels/persistent-shop-orders-normalised"
            roles: []
          sources:
          - tenant: shop
            namespace: orders
            name: ticks
            className: com.github.pakisan.kurkik.pulsar.fixtures.Ticks
            archive: source://shop/orders/ticks@1
            output: persistent://shop/orders/ticks
            parallelism: 1
            processingGuarantees: ATLEAST_ONCE
            channels:
            - $ref: "#/channels/persistent-shop-orders-ticks"
            roles: []
          sinks:
          - tenant: shop
            namespace: orders
            name: audit-log
            className: com.github.pakisan.kurkik.pulsar.fixtures.AuditLog
            archive: sink://shop/orders/audit-log@1
            inputs:
            - persistent://shop/orders/enriched
            subscriptionName: audit-log
            parallelism: 1
            processingGuarantees: ATLEAST_ONCE
            channels:
            - $ref: "#/channels/persistent-shop-orders-enriched"
            roles: []
          brokerConfiguration:
            advertisedAddress: localhost
            backlogQuotaDefaultLimitGB: "10.0"
            bookkeeperClientMinNumRacksPerWriteQuorum: "1"
            bookkeeperClientReorderReadSequenceEnabled: "false"
            bookkeeperNumberOfChannelsPerBookie: "1"
            brokerDeleteInactiveTopicsEnabled: "false"
            clusterName: standalone
            enablePackagesManagement: "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://localhost:6650
            webServiceUrl: http://localhost:28080
          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: OrderCreated
            namespace: com.shop
            fields:
            - name: id
              type: string
            - name: total
              type: long
        name: persistent-shop-orders-created
        title: persistent://shop/orders/created
        summary: "Schema read from Pulsar's own registry: AVRO, version 0."
        x-kurkik:
          pulsar:
            message:
              schemaType: AVRO
              schemaVersion: 0
              schemaIdLocation: metadata
              schemaLookupStrategy: topic
              schemaCompatibility: BACKWARD
              key:
                type: string
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/created
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  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: BACKWARD
              key:
                type: string
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/enriched
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  persistent-shop-orders-normalised:
    address: persistent://shop/orders/normalised
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/normalised
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  persistent-shop-orders-paid:
    address: persistent://shop/orders/paid
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/paid
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 6
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 6
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  persistent-shop-orders-raw:
    address: persistent://shop/orders/raw
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/raw
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  persistent-shop-orders-refunds:
    address: persistent://shop/orders/refunds
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/refunds
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
  persistent-shop-orders-ticks:
    address: persistent://shop/orders/ticks
    messages:
      persistent-shop-orders-ticks:
        payload:
          type: string
        name: persistent-shop-orders-ticks
        title: persistent://shop/orders/ticks
        summary: "Schema read from Pulsar's own registry: STRING, version 0."
        x-kurkik:
          pulsar:
            message:
              schemaType: STRING
              schemaVersion: 0
              schemaIdLocation: metadata
              schemaLookupStrategy: topic
              schemaCompatibility: BACKWARD
              key:
                type: string
    bindings:
      pulsar:
        bindingVersion: 0.1.0
        namespace: orders
        persistence: persistent
        retention:
          time: 60
          size: 1024
        ttl: 600
        deduplication: true
    x-kurkik:
      pulsar:
        channel:
          topic: persistent://shop/orders/ticks
          tenant: shop
          namespace: orders
          persistence: persistent
          partitions: 0
          deduplication: true
          geo-replication:
          - standalone
          retention:
            time: 60
            size: 1024
          ttl: 600
          topicConfiguration:
            backlog-quota destination_storage: "limit 536870912 bytes, producer_request_hold"
            deduplication: true
            message-ttl: 600
            partitions: 0
            persistence: persistent
            replication-clusters:
            - standalone
            retention:
              timeInMinutes: 60
              sizeInMB: 1024
            schema-autoupdate: "on"
            schema-compatibility-strategy: BACKWARD
operations:
  receive_persistent-shop-orders-created:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-created"
    x-kurkik:
      pulsar:
        operation:
          groupId:
            type: string
            enum:
            - audit
            - billing
            - enrich
          security:
          - audit
          - billing
          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:
          groupId:
            type: string
            enum:
            - audit-log
          security:
          - billing
          processors:
          - type: sink
            name: shop/orders/audit-log
            server: standalone
          consumerConfiguration: {}
  receive_persistent-shop-orders-normalised:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-normalised"
    x-kurkik:
      pulsar:
        operation:
          security:
          - billing
          consumerConfiguration: {}
  receive_persistent-shop-orders-paid:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-paid"
    x-kurkik:
      pulsar:
        operation:
          security:
          - billing
          consumerConfiguration: {}
  receive_persistent-shop-orders-raw:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-raw"
    x-kurkik:
      pulsar:
        operation:
          groupId:
            type: string
            enum:
            - normalise
          security:
          - billing
          processors:
          - type: function
            name: shop/orders/normalise
            server: standalone
          consumerConfiguration: {}
  receive_persistent-shop-orders-refunds:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-refunds"
    x-kurkik:
      pulsar:
        operation:
          security:
          - billing
          consumerConfiguration: {}
  receive_persistent-shop-orders-ticks:
    action: receive
    channel:
      $ref: "#/channels/persistent-shop-orders-ticks"
    x-kurkik:
      pulsar:
        operation:
          security:
          - billing
          consumerConfiguration: {}
  send_persistent-shop-orders-created:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-created"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          producerConfiguration: {}
  send_persistent-shop-orders-enriched:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-enriched"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          processors:
          - type: function
            name: shop/orders/enrich
            server: standalone
          producerConfiguration: {}
  send_persistent-shop-orders-normalised:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-normalised"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          processors:
          - type: function
            name: shop/orders/normalise
            server: standalone
          producerConfiguration: {}
  send_persistent-shop-orders-paid:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-paid"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          producerConfiguration: {}
  send_persistent-shop-orders-raw:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-raw"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          producerConfiguration: {}
  send_persistent-shop-orders-refunds:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-refunds"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          producerConfiguration: {}
  send_persistent-shop-orders-ticks:
    action: send
    channel:
      $ref: "#/channels/persistent-shop-orders-ticks"
    x-kurkik:
      pulsar:
        operation:
          security:
          - checkout
          processors:
          - type: source
            name: shop/orders/ticks
            server: standalone
          producerConfiguration: {}

Other situations

Questions people ask

How do I move Pulsar Functions to another cluster?

Publish their packages to the new cluster, export with --packages naming the package each function runs, then run kurkik pulsar sync. Pulsar does not say which package a running function came from, so you have to

Are function secrets and user configuration copied?

No. They are never written into the document and are not set by sync

Can an AI agent apply the migration?

No. The MCP tools read, compare and plan. A person runs the command, and permissions never reach the agent

The series

One post per system Kurkik reads:

  1. Moving Apache Kafka
  2. Apache Pulsar (you are here)
  3. Moving Amazon SNS
  4. Moving Amazon SQS
This post is licensed under CC BY 4.0 by the author.