reckon_db_emitter (reckon_db v1.2.7)
View SourceEmitter worker for reckon-db
A gen_server that handles event broadcasting for subscriptions. Each subscription has a pool of emitter workers that receive events from Khepri triggers and forward them to subscribers.
Message types handled: - {broadcast, Topic, Event}: Broadcast event to all subscribers on topic - {forward_to_local, Topic, Event}: Forward event locally (optimization) - {events, [Event]}: Direct event delivery to subscriber pid
Summary
Functions
Create a child spec for the emitter worker
Start an emitter worker
Update the subscriber pid
Types
-type event() :: #event{event_id :: binary(), event_type :: binary(), stream_id :: binary(), version :: non_neg_integer(), data :: map() | binary(), metadata :: map(), tags :: [binary()] | undefined, timestamp :: integer(), epoch_us :: integer(), data_content_type :: binary(), metadata_content_type :: binary()}.
Functions
-spec child_spec(atom(), binary(), pid() | undefined, atom()) -> supervisor:child_spec().
Create a child spec for the emitter worker
Start an emitter worker
Update the subscriber pid