Experimental
Creates a client for the Restate ingestion API, the API to turn any source of events into Restate invocations.
const client = connect({ url: "http://localhost:8080" });const producer = client.producer({ defaults: { service: "Orders", handler: "ingest" },});for (const order of orders) { await producer.send({ key: order.id, body: JSON.stringify(order) });}await producer.close();await client.close(); Copy
const client = connect({ url: "http://localhost:8080" });const producer = client.producer({ defaults: { service: "Orders", handler: "ingest" },});for (const order of orders) { await producer.send({ key: order.id, body: JSON.stringify(order) });}await producer.close();await client.close();
Creates a client for the Restate ingestion API, the API to turn any source of events into Restate invocations.