Introducing our new event Stream Hub.

Product

Introducing our new event Stream Hub.

September 4, 2025 Duccio Giovannelli

At Commerce Layer, we’re always working to make our platform more transparent, event-driven, and integration-friendly. Today, we’re excited to introduce our new Change Data Capture (CDC) system, a foundational upgrade to how we track and expose resource changes across the Commerce Layer API.

With CDC, every time a resource is created or updated — whether it's an order, a customer, a SKU, or anything else — we generate a corresponding event. These events include what changed and who made the change. We store these events persistently and make them available through a new set of powerful APIs designed for modern integrations.

What is CDC?

CDC (Change Data Capture) is a design pattern that captures and tracks changes to data in real time. Rather than polling for updates or relying on webhooks alone, CDC allows systems to react to changes as they happen, providing a much more efficient and scalable way to integrate with external services.

Real-time event streaming

For enterprise organizations, we now offer real-time event streaming through a new service called Stream Hub. Using Server-Sent Events (SSE), enterprise clients can subscribe to an event stream and consume updates as they happen — no polling required.

Each event contains:

  • The type of change (create or update).
  • The affected resource type and ID.
  • The actor who triggered the change.
  • The exact timestamp of the change.

Replay historical events

Our Stream Hub isn't just for real-time streaming. It also supports a replay endpoint that lets you query historical events. You can:

  • Filter by resource type.
  • Filter by specific resource IDs.
  • Retrieve all events for your organization.

This makes it easy to backfill data, audit past changes, or recover from missed events.

Paginated event access via API

In addition to the streaming and replay capabilities, each resource now exposes a new relationship called event_stores. This gives you direct access to the change events related to a specific resource, in JSON:API format, complete with pagination.

For example, to see all events related to a specific order, you can call:

GET /api/orders/:id/event_stores

More visibility coming soon

Currently, the CDC system generates events for internal operations—specifically, when resources are created, updated, or destroyed. But we’re not stopping there.

In the near future, we plan to expand visibility by including external payloads in the event stream. That means you’ll be able to track events like:

  • Webhooks received from payment gateways.
  • API calls made to third-party services.
  • Other side-effects tied to a specific resource.

This will provide even greater transparency around what’s happening to your data — both inside and outside Commerce Layer — enabling more advanced monitoring, auditing, and automation.

Why it matters

This new CDC system brings several key benefits:

  • Observability
    Know exactly what changed, when, and by whom.
  • Resilience
    Replay missed events to recover from failures.
  • Efficiency
    React to changes in real time without polling.
  • Auditability
    Maintain a full, queryable log of data changes.

Whether you're syncing data with an external system, triggering workflows in your infrastructure, or building internal tools, CDC gives you a consistent and reliable stream of truth from Commerce Layer.