Temporal State
How Temporal State Works with JetStream
// Conceptually, a temporal state snapshot includes:
{
state: { /* state at this point in time */ },
context: { // Essential event context
id: 'evt-456', // The event that created this state
causationId: 'evt-123', // What caused this event
correlationId: 'order-789', // Transaction this event belongs to
sender: 'payment-service', // Node that sent the event
timestamp: 1621452789000, // When it happened
eventType: 'payment-processed' // Type of event
}
}JetStream Key-Value Store for Historical State
Accessing Temporal State
Traversing Causal Chains
Efficient Implementation through JetStream
Customizing Retention Policies
Event Sourcing
Recovery and Resilience
Benefits of JetStream-Powered Temporal State
Last updated