Skip to main content

Event Processing

Lightweight, transactional event processing.

Process Kafka events with durable, transactional workflows.
Restate takes care of the event plumbing and pushes events to your handler.

Event Processing

Lightweight, resilient functions
Restate automatically handles retries and recovers execution progress after failures. Restate is a single binary and your code runs as a standard application in Docker containers or serverless environments, with no extra infrastructure required.
From complex workflows to rapid ETL tasks
Restate processes in parallel by key rather than partition, preventing long-running functions from blocking other keys. Functions support complex patterns including loops, timers, and dynamic execution paths.
Zero Kafka consumer management
Restate pushes events directly to your handlers, eliminating the need to implement consumers, manage subscriptions, or track offsets.

Transactional event processing with Restate

Durable business logic and side effects

Restate persists execution progress and automatically retries from the exact point of failure. When you perform side effects in a run block, Restate persists the result and replays it after crashes, enabling resilient workflow-like code.

Learn more

Durable business logic and side effects

Restate persists execution progress and automatically retries from the exact point of failure. When you perform side effects in a run block, Restate persists the result and replays it after crashes, enabling resilient workflow-like code.

Learn more

Zero Kafka consumer management

Connect functions to Kafka topics and let Restate handle all consumer management — including polling for records, committing offsets, and recovery.

Learn more

Zero Kafka consumer management

Connect functions to Kafka topics and let Restate handle all consumer management — including polling for records, committing offsets, and recovery.

Learn more

Queue per key

Events are routed to objects based on Kafka keys, with Restate ensuring sequential, in-order processing for each key. Processing delays for one key never block events for other keys. In the example, slow moderation checks do not block posts for other users.

Queue per key

Events are routed to objects based on Kafka keys, with Restate ensuring sequential, in-order processing for each key. Processing delays for one key never block events for other keys. In the example, slow moderation checks do not block posts for other users.

Schedule events or postpone processing

Flexibly postpone event processing or schedule asynchronous tasks for immediate or future execution. Restate tracks all timers and triggers execution exactly when needed. Restate's queue per key, makes sure that slow moderation checks do not block posts for other users.

Schedule events or postpone processing

Flexibly postpone event processing or schedule asynchronous tasks for immediate or future execution. Restate tracks all timers and triggers execution exactly when needed. Restate's queue per key, makes sure that slow moderation checks do not block posts for other users.

Flexible control flow

Unlike traditional stream processing systems, Restate imposes no restrictions on control flow (e.g., DAGs). Each event creates its own execution path through your code and builds a dedicated recovery log.

Flexible control flow

Unlike traditional stream processing systems, Restate imposes no restrictions on control flow (e.g., DAGs). Each event creates its own execution path through your code and builds a dedicated recovery log.

Scale with serverless

Deploy your functions on serverless platforms where Restate pushes events to them and scale based on demand.

Learn more

Scale with serverless

Deploy your functions on serverless platforms where Restate pushes events to them and scale based on demand.

Learn more

const userFeed = restate.object({
name: "userFeed",
handlers: {
processPost: async (ctx: restate.ObjectContext, post: SocialMediaPost) => {
const userId = ctx.key
const postId = await ctx.run(() => createPost(userId, post));
while ((await ctx.run(() => getPostStatus(postId))) === PENDING) {
await ctx.sleep(5_000);
}
await ctx.run(() => updateUserFeed(userId, postId));
},
},
});
export const awsLambdaHandler = restate
.endpoint()
.bind(userFeed)
.handler();

Event handlers as regular, lightweight functions

Let Restate manage your Kafka subscriptions and deliver events directly to your functions.
Your handlers run as standard services in your existing infrastructure with no special requirements.

Event handlers as regular, lightweight functions

Stateful event processing with Restate

Implement stateful event handlers with Restate.

K/V State and Event Enrichment

Store persistent, consistent state directly in Restate and access it from any handler of the service. State is delivered with each request, allowing you to operate on local data without external database calls.

Learn more

K/V State and Event Enrichment

Store persistent, consistent state directly in Restate and access it from any handler of the service. State is delivered with each request, allowing you to operate on local data without external database calls.

Learn more

Agents, actors and state machines

Build event-driven agents, actors, digital twins, and state machines with Kafka integration. Restate provides simple concurrency guarantees while ensuring full resilience and consistency without additional infrastructure.

Agents, actors and state machines

Build event-driven agents, actors, digital twins, and state machines with Kafka integration. Restate provides simple concurrency guarantees while ensuring full resilience and consistency without additional infrastructure.

Combine Kafka and RPC

Use the same functions for both Kafka events and RPC calls without code changes. Process events from multiple sources — registration requests via HTTP, location updates via Kafka, and queries from dashboards — all using the same handlers.

Combine Kafka and RPC

Use the same functions for both Kafka events and RPC calls without code changes. Process events from multiple sources — registration requests via HTTP, location updates via Kafka, and queries from dashboards — all using the same handlers.

const packageTracker = restate.object({
name: "package-tracker",
handlers: {
registerPackage: async (ctx: ObjectContext, packageInfo: PackageInfo) => {
ctx.set("package-info", packageInfo);
},
updateLocation: async (ctx: ObjectContext, locationUpdate: LocationUpdate) => {
const packageInfo = await ctx.get<PackageInfo>("package-info");
if (!packageInfo) {
throw new TerminalError(`Package not found`);
}
(packageInfo.locations ??= []).push(locationUpdate);
ctx.set("package-info", packageInfo);
},
getPackageInfo: shared((ctx: ObjectSharedContext) =>
ctx.get<PackageInfo>("package-info")),
},
});
restate.endpoint().bind(packageTracker).listen();
LOW-LATENCY

Restate processes events at high speed using a dedicated queue per key, pushing events to your functions for maximum parallel throughput.

Learn more

DURABLE EXECUTION

Restate handles all Kafka interaction complexities, guarantees exactly-once processing, and recovers event handlers to the precise point before any failure.

Learn more

Detailed Observability

Understand what is happening in your event-driven apps, by using the UI, the CLI, and the built-in tracing.
Debug failing executions, inspect the K/V state, and manage deployments.

Detailed Observability
What can you do with UI?What can you do with CLI?

What you can build with Event Processing and Restate

Event-driven state machines

Track deliveries by processing location updates from Kafka and automatically transitioning orders through their lifecycle states.

Stateful actors

Build systems like transit fare calculators that maintain state, combine event streams, schedule follow-up tasks, and execute durable payment operations.

Webhook event processing

Point your webhook to Restate for automatic retry handling and fault-tolerant processing with exactly-once semantics.

Delayed message queue

Schedule messages for future execution. Restate handles scheduling, delivery, and processing with built-in durability.

Conditional reminders

Implement intelligent retry loops that send reminders until specific conditions are met, showcasing Restate's flexible control flow capabilities.

Wondering about a specific use case?

Let’s brainstorm together on Discord or Slack.

Didn't see your use case?

💡 You can connect any handler to a Kafka topic, so have a look at the other use case pages for more inspiration.

Developer Resources

Docs

Read the docs to learn more.

Kafka + Restate Quickstart

Get started with your first Restate Kafka handler.

Need help?

Join the Restate Discord or Slack communities