Swiftybase
Function StackSSE

New SSE Event

Define a new Server-Sent Events (SSE) event with optional fields such as id, event, and data.
This event object can then be sent to a client using Send SSE or Publish SSE.

This block is useful when you want to create a reusable or custom-formatted SSE event.
You can configure various metadata and payload fields to control how the client receives and processes the event.

Config

  • Id
    Optional unique identifier for the event. Useful for reconnection and deduplication.

  • Type
    The name/type of the event. This appears in the event: field of the SSE payload on the client.

  • Data
    The message payload (can be text or JSON). This is the content delivered to the client.

  • Retry
    Optional reconnection interval that informs the client how long to wait before retrying if the connection is lost.

Output

  • Returns
    A SSEEvent instance, which can be passed to functions like Send SSE or Publish SSE to send the event to the client.

On this page