Apache Pulsar 00:00:01 An order finds its broker and its journal A store publishes an order to a persistent Apache Pulsar topic. A broker owns the topic's serving path, while Apache BookKeeper bookies store its entries. Follow those two responsibilities separately. The producer looked up the owner of the topic and sends to broker 1. Broker 1 writes entry 12 of ledger 1 to bookies 1 and 2 at the same time. Both have it in their journal on disk. The ack quorum is 2. The producer gets its answer. Consumers are served from the cache of the broker. For this example the acknowledgement quorum is two. An acknowledged persistent entry and a consumer acknowledgement are separate events, with different owners. 00:00:41 Change broker without moving the old ledger The serving broker fails soon after the sale. If the historical ledger were tied to its local disk, changing brokers could require moving the entire order history before accepting new work. Broker 1 writes ledger 1 to bookies 1 and 2. It loses its session in the metadata store. Broker 2 becomes the owner of the bundle. Ledger 1 is fenced on the bookies. Its last confirmed entry is found and it is closed. Ledger 2 goes to bookies 2 and 3. Ledger 1 stays where it is. The new owner fences the previous ledger writer, recovers the ledger and continues in a new one. Historical entries can stay on their bookies while serving ownership changes. 00:01:22 Spread entries across a bookie ensemble Suppose an ensemble has four bookies and each entry is written to two. Watch how consecutive entries can rotate through different pairs rather than mirroring the entire ledger onto only one pair. Entry zero goes to bookies zero and one. Entry one goes to bookies one and two. Entry two goes to bookies two and three. Entry three wraps around to bookies three and zero. The ensemble size, write quorum and acknowledgement quorum are distinct configuration decisions. They determine which machines receive each entry and how much evidence the producer waits for. 00:01:56 Independent subscriptions read the same sale Billing and email each need the orders, so give them different subscriptions. Workers inside one subscription then cooperate according to the subscription type. Order 1 is delivered to both subscriptions. In mail, consumer A gets order 1 and consumer B gets order 2. B is faster and acknowledges order 2 first. The cursor stores the hole. With Key_Shared, all orders of customer 7 go to A, and customer 8 to B. Shared distribution can reorder work among consumers. Key-shared delivery is an alternative when ordering by a key matters, and the producer's batching configuration must respect that choice. 00:02:33 A forgotten reader keeps a backlog A developer makes a durable test subscription, runs it once and stops. The production teams continue processing normally. Storage is still growing, because retention also depends on what the forgotten subscriber has acknowledged. Somebody subscribed with the name test and stopped the program. With the example's policy, the stalled cursor can keep older ledgers in the backlog after active subscribers have finished with them. Retire the unused subscription when its backlog can be discarded. A well-chosen message expiry or backlog policy can bound future accumulation. Inspect backlog by subscription. Set explicit retention, expiry and backlog policies for the business promise you intend to keep, and retire consumers after their owners confirm the history is no longer needed.