Skills Development Websockets Event Handler Abstraction

Websockets Event Handler Abstraction

v20260825
webiny-admin-websockets-catalog
This abstraction provides a centralized mechanism for handling every incoming WebSocket message. Instead of directly subscribing to the service, handlers register themselves and are responsible for filtering the event payload based on a specific 'action'. This ensures components react only to the events they are interested in, promoting efficient and decoupled application architecture.
Get Skill
351 downloads
Overview

admin/websockets

How to Use

  1. Find the abstraction you need below
  2. You MUST read the source file to get the exact interface and types!
  3. Import: import { Name } from "<importPath>";

Abstractions


Name: WebsocketEventHandler Import: import { WebsocketEventHandler } from "webiny/admin/websockets" Source: @webiny/app-websockets/events/abstractions.ts Description: Handlers registered against this abstraction receive EVERY incoming websocket message (published as a WebsocketEvent by the websockets→EventPublisher bridge). Each handler is responsible for filtering by event.payload.action and reacting to the ones it cares about, instead of subscribing to the websocket service directly.


Info
Category Development
Name webiny-admin-websockets-catalog
Version v20260825
Size 843B
Updated At 2026-09-06
Language