Function StackSSE
Stop SSE Publisher
Stops an active SSEPublisher and cleans up any associated resources.
This is typically used during server shutdown to gracefully close connections and release memory or background tasks.
Config
- Publisher
An instance ofSSEPublisher
, typically created once and registered globally.
This instance is responsible for broadcasting events to clients subscribed to specific channels.
Usage Notes
- Call this function only when you're sure the server no longer needs to send SSE events.
- Ideal for use in server shutdown hooks or cleanup routines.
- After stopping, the publisher should not be reused unless re-initialized.
Calling Stop SSE Publisher
will prevent any further event broadcasting through the given publisher.