Function: registerMemorySessionEventStorage()
Makaio Framework / services-core / registerMemorySessionEventStorage
Function: registerMemorySessionEventStorage()
Section titled “Function: registerMemorySessionEventStorage()”registerMemorySessionEventStorage(
bus): () =>void
Defined in: ../../../packages/services/core/src/session/session-events/memory-handler.ts:229
Register in-memory session event storage handlers.
Suitable for development, testing, and single-instance deployments. Data is lost when the process exits.
Events are stored per-session in insertion order. Cursor-based pagination
uses a stable, monotonically-increasing sequence ID (seqIdByEventId)
assigned at append time — semantically equivalent to the Drizzle handler’s
auto-increment id column. Cursors survive concurrent appends and remain
meaningful after deletes: an after cursor simply skips all events whose
seqId is ≤ the cursor value, regardless of whether the referenced event
still exists.
Parameters
Section titled “Parameters”The bus instance to register handlers on
Returns
Section titled “Returns”Cleanup function to unsubscribe all handlers
() => void
Example
Section titled “Example”import { registerMemorySessionEventStorage } from '@makaio/services-core/session';
const cleanup = registerMemorySessionEventStorage(bus);
// Later, when shutting down:cleanup();