method EventLog.prototype.append
EventLog.prototype.append<T>(
topic: string,
data: T,
options?: AppendOptions,
): Task<string, EventLogAppendFailed>

Append an event to a topic.

Returns the event ID which can be used for logging or correlation.

Examples

Example 1

const eventId = await log.append("users", { action: "created" }).run();

// With options
await log.append("orders", order, {
  partitionKey: order.userId,
  metadata: { source: "checkout" },
}).run();

Type Parameters

Parameters

topic: string
data: T
optional
options: AppendOptions

Return Type

Usage

import { EventLog } from ".";