Stream connects services via events—order placed, user signed up, file uploaded. Services publish events and subscribe to topics, without knowing who's listening or producing.
Stream provides pub/sub messaging with ordering guarantees, exactly-once delivery semantics, replay capability, and consumer groups. Events are schema-validated, indexed, and routable by topic or pattern. It integrates with Worker for async processing, Hooks for external delivery, and Ledger for durable storage.
How teams use Stream to build better systems
Connect services through events without tight coupling or direct dependencies
Process events as they happen for instant reactions and updates
Allow services to communicate without knowing about each other directly
Keep multiple services and databases in sync through event propagation
Build real-time activity streams and notification feeds from events
Stream events to analytics systems for real-time insights and processing
Built for real-time event processing at scale
Get started with Stream using our official SDKs
import { Fourbyfour } from '@fourbyfour/sdk';
const client = new Fourbyfour({
apiKey: 'your-api-key',
projectId: 'your-project-id'
});
// Create a topic
await client.stream.topics.create({
name: 'order.placed',
partitions: 3
});
// Publish an event
await client.stream.topics.produce('order.placed', {
key: 'order-123',
value: { orderId: '123', total: 99.99 }
});
// Consume events
const { records } = await client.stream.topics.consume('order.placed', {
group: 'checkout-service'
});Install the SDK: npm install @fourbyfour/sdk
Understanding Stream's workflow
Publishers send events to topics with automatic schema validation and batching for efficiency. Events are assigned sequence numbers for ordering guarantees.
Events are routed to topic partitions based on keys, ensuring ordered delivery per partition. Pattern matching allows wildcard subscriptions across multiple topics.
Consumer groups enable load balancing across multiple subscribers. Each consumer in a group receives a subset of partitions, with automatic rebalancing on failures.
Consumers acknowledge event processing with offset commits. Exactly-once semantics prevent duplicate processing even during failures or rebalancing.
Add Stream to your project and build event-driven systems