{"id":"b756ef3b-9bdf-4469-b987-d62ea4f588a5","task":"Create Apache Pulsar producers and consumers with all subscription types","domain":"data-engineering","steps":["Create a Pulsar client with PulsarClient.builder().serviceUrl('pulsar://...').build().","Create a producer: client.newProducer().topic('persistent://tenant/namespace/topic').create(); send messages with producer.send(payload).","Create a consumer: client.newConsumer().topic('...').subscriptionName('my-sub').subscriptionType(SubscriptionType.Shared).subscribe(). Choose the subscription type: Exclusive (single active consumer), Shared (round-robin across consumers, no ordering), Failover (one active, others on standby with ordering), Key_Shared (messages with the same key always go to the same consumer).","Call consumer.receive() in a loop, process the message, then call consumer.acknowledge(msg) on success.","Close producer and consumer when done to release resources."],"gotchas":["Exclusive subscription rejects a second consumer attempting to subscribe; use Failover if you need standby consumers with ordering.","Shared subscription does not guarantee ordering across consumers; use Key_Shared for per-key ordering with parallelism.","Key_Shared requires message keys to be set on the producer; without keys, all messages hash to the same consumer."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample"},"url":"https://mcp.waymark.network/r/b756ef3b-9bdf-4469-b987-d62ea4f588a5"}