Files
nexus/wiki/concepts/Platform-Events.md
2026-04-21 00:02:55 +08:00

41 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Platform Events vs CDC"
type: concept
tags: [salesforce, integration, events]
sources: [specialized-salesforce-architect.md]
last_updated: 2026-04-20
---
# Platform Events vs CDC
Salesforce 事件驱动集成的两种模式对比。
## Platform Events
| 特性 | 说明 |
|-----|-----|
| 自定义载荷 | 是 — 定义自己的 schema |
| 跨系统集成 | 首选 — 解耦生产者和消费者 |
| 字段级追踪 | 否 |
| 重放 | 72 小时窗口 |
| 容量 | 高容量标准100K/天) |
| 使用场景 | "某事发生"(业务事件) |
## Change Data Capture (CDC)
| 特性 | 说明 |
|-----|-----|
| 自定义载荷 | 否 — 镜像 sObject 字段 |
| 跨系统集成 | 有限 — 仅 Salesforce 原生事件 |
| 字段级追踪 | 是 — 捕获字段变更 |
| 重放 | 3 天保留 |
| 容量 | 绑定到对象事务量 |
| 使用场景 | "某事变化"(数据同步) |
## 选择指南
- 需要跨系统集成 → Platform Events
- 只需要 Salesforce 内部变更追踪 → CDC
## 来源
[[Salesforce-Architect]] 智能体的架构设计指南