interface EventClient
Properties
coldHotStream
Play from persisted storage the continue from in memory
Signature
coldHotStream: (config: {
parallelEventCount?: number;
rawEvents: true;
stream: string | string[];
groupId: string;
handler: (event: EncodedEvent) => Promise<void>;
onError: (error: any) => void;
} | {
parallelEventCount?: number;
rawEvents: false;
stream: string | string[];
groupId: string;
handler: (event: EventicleEvent) => Promise<void>;
onError: (error: any) => void;
} | {
parallelEventCount?: number;
stream: string | string[];
groupId: string;
handler: (event: EventicleEvent) => Promise<void>;
onError: (error: any) => void;
}) => Promise<EventSubscriptionControl>;
coldStream
Play from persisted storage
Signature
coldStream: (config: {
stream: string;
handler: (event: EventicleEvent) => Promise<void>;
onError: (error: any) => void;
onDone: () => void;
}) => Promise<EventSubscriptionControl>;
hotRawStream
Only play hot data.
Signature
hotRawStream: (config: {
parallelEventCount?: number;
stream: string | string[];
groupId: string;
handler: (event: EncodedEvent) => Promise<void>;
onError: (error: any) => void;
}) => Promise<EventSubscriptionControl>;