Event Processing
Lightweight, transactional event processing.
Process Kafka events with flexible flows of transactional steps.
Restate takes care of the event plumbing and pushes events to your handler.
Lightweight Durable Functions
Queue per key
Push events to functions
Event processing with Restate
Connect functions to Kafka topics. Restate pushes the events to your function.
- TypeScript
- Java
- Kotlin
- Go
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
Lightweight Durable Functions
Write functions that take Kafka events as inputs. Functions execute with Durable Execution: their progress is tracked and they can be retried from the exact point before the crash, as if you are taking micro-checkpoints throughout the function execution.
Push events to functions
Let Restate subscribe to a Kafka topic and specify to which function to push the events. Restate will take care of the event plumbing: polling for records, committing offsets, recovering...
Queue per key
Events get sent to objects based on the Kafka key. For each key, Restate ensures that events are processed sequentially and in order. Slow events on other keys do not block processing.
In the example, we process user updates in a queue per user. Slow updates for one user do not block updates for other users.
Postpone processing
Flexibly postpone processing of events until later. Restate tracks the timers and re-invokes. When sleeping, other events for that key are enqueued.
Here, we postpone processing for 5 seconds if the user profile is not ready yet.
Durable side effects
The results of interactions with external systems are tracked and recovered after failures. This simplifies writing flows that keep multiple systems in sync.
Flexible control flow
As opposed to many stream processing systems, Restate does not put any restrictions on the control flow (e.g. DAG). Each event crafts its own path through the code and builds up its own recovery log.
LOW-LATENCY
Restate’s event-driven foundation built in Rust lets you process events at high speed. Restate keeps a queue per key and pushes events to your functions to process them in parallel as fast as possible.
DURABLE EXECUTION
Restate manages the complexities of reading from Kafka to make sure each event gets processed exactly once. Restate handles retries and recovery of your event handlers to the exact point before the crash.
Stateful event processing with Restate
Implement stateful event handlers with Restate.
- TypeScript
- Java
- Kotlin
- Go
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
K/V State
Store state in Restate and access it from other handlers. Restate guarantees that it is consistent and persistent. The state gets delivered together with the request, so you operate on local state.
Event Enrichment
Enrich events with data from multiple sources by storing it in state and eventually exposing it via other functions.
Delayed actions
Schedule async follow-up tasks for now or for later. Restate tracks the timers and triggers them when the time comes.
Here, we wait one second for other user features to arrive before sending the event to downstream processing.
Combine Kafka and RPC
Functions can be called over RPC or Kafka without changing the code. In the example, the registration can come over Kafka, while the email gets called via HTTP.
Event handlers as regular, lightweight functions
Let Restate subscribe to a Kafka topic and push events to your functions.
Your functions run as normal services in your existing infra.
What you can build with Event Processing and Restate
Kafka-triggered workflows
Handle the payment, request the order preparation, wait for driver acceptance callback, etc.
Digital twin pattern
A delivery service that responds to location updates arriving over Kafka. The order gets updated accordingly.