{"version":"2.1.246","anchor":"event-emitter-that-buffers-events-until-someone-listens","canonical_anchor":"event-emitter-that-buffers-events-until-someone-listens","heading":"Event emitter that buffers events until someone listens","tier":"internal","area":"Startup","scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246\/e\/event-emitter-that-buffers-events-until-someone-listens","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.246","markdown":"### Event emitter that buffers events until someone listens\n\nEvents fired before anything is listening are now replayed instead of lost.\n\n**What**\n\nA new wrapper holds emitted events per name while nothing is subscribed, replays them to the first subscriber and passes through afterwards, so events fired during startup are not lost.\n\n**Details**\n\n- Unsubscribing more than once is harmless and decrements the subscriber count only once.\n\n**Evidence**\n\n`subscribe`\n\n- Area: Startup\n- Tier: Under the hood\n- Useful: 2\/5\n- Signal: 2\/5"}