---
# === IDENTITY ===
id: business/erp-integration/erp-event-driven-comparison/2026
canonical_question: "How do event-driven integration capabilities compare - Platform Events, Event Mesh, CDC, Business Events?"
aliases:
  - "ERP event-driven integration comparison Platform Events vs Event Mesh vs CDC"
  - "Which ERP has the best event-driven architecture for integrations?"
  - "Compare Salesforce Platform Events SAP Event Mesh Oracle Business Events Dynamics 365 Data Events"
  - "Event-driven vs CDC vs Business Events across ERP platforms"
entity_type: erp_integration
domain: business > erp-integration > erp-event-driven-comparison
region: global
jurisdiction: global
temporal_scope: 2024-2026

# === SYSTEM PROFILE ===
systems:
  - name: "Salesforce"
    vendor: "Salesforce"
    version: "API v62.0 (Spring '26)"
    edition: "Enterprise, Unlimited, Performance"
    deployment: cloud
    api_surface: "Platform Events, Change Data Capture, Pub/Sub API"
  - name: "SAP S/4HANA Cloud"
    vendor: "SAP"
    version: "2408"
    edition: "Public Cloud, Private Cloud"
    deployment: cloud
    api_surface: "SAP Event Mesh, Advanced Event Mesh (Solace)"
  - name: "Oracle ERP Cloud"
    vendor: "Oracle"
    version: "24B"
    edition: "Fusion Cloud ERP"
    deployment: cloud
    api_surface: "Business Events, Oracle Integration Cloud"
  - name: "Microsoft Dynamics 365 Finance & Operations"
    vendor: "Microsoft"
    version: "10.0.40+"
    edition: "Finance, Supply Chain Management"
    deployment: cloud
    api_surface: "Business Events, Data Events, Dataverse"

# === VERIFICATION ===
last_verified: 2026-03-02
confidence: 0.87
version: 1.0
first_published: 2026-03-02

# === TEMPORAL VALIDITY ===
temporal_validity:
  status: volatile
  last_breaking_change: "SAP Advanced Event Mesh GA with Event Studio planned early 2026"
  next_review: 2026-08-29
  change_sensitivity: high

# === CONSTRAINTS ===
constraints:
  - "Salesforce Platform Events: max 1 MB payload per event; 3-day replay retention window only"
  - "Salesforce CDC: limited to standard and custom objects enabled by admin; shares delivery allocation with Platform Events"
  - "SAP Event Mesh: max 1 MB message size, 10 GB total storage; Advanced Event Mesh needed for larger payloads (30 MB) and event replay"
  - "Oracle Business Events: callback-based delivery model requires Oracle Integration Cloud (OIC) subscription; no standalone event broker"
  - "Dynamics 365 Data Events: only PostOperation stage supported for virtual entity events; PreValidation and Synchronous execution not supported"
  - "Cross-vendor event mesh: no native cross-vendor event mesh exists; requires iPaaS (MuleSoft, Boomi, Workato) or custom Kafka/Solace broker"
  - "Edition-gating: Salesforce Platform Events high-volume add-on and SAP Advanced Event Mesh are separately licensed products"

# === SKIP CONDITIONS ===
skip_this_unit_if:
  - condition: "Need only Salesforce-specific event architecture details"
    use_instead: "business/erp-integration/salesforce-streaming-platform-events/2026"
  - condition: "Need only SAP Event Mesh configuration and setup"
    use_instead: "business/erp-integration/sap-event-mesh-capabilities/2026"
  - condition: "Need CDC for analytics/data warehouse sync rather than ERP integration"
    use_instead: "N/A — this card covers ERP-to-ERP event patterns, not ETL/analytics CDC"
  - condition: "Need batch/bulk integration comparison instead of event-driven"
    use_instead: "business/erp-integration/erp-bulk-import-comparison/2026"

# === AGENT HINTS ===
inputs_needed:
  - key: integration_pattern
    question: "What integration pattern do you need?"
    type: choice
    options:
      - "real-time sync (individual records, <1s latency)"
      - "event-driven (webhook, CDC, platform events)"
      - "event mesh (multi-system pub/sub)"
  - key: data_volume
    question: "What's your daily event volume?"
    type: choice
    options:
      - "< 10,000 events/day"
      - "10,000-100,000 events/day"
      - "> 100,000 events/day"
  - key: systems_involved
    question: "Which ERP systems are involved?"
    type: choice
    options:
      - "Salesforce"
      - "SAP S/4HANA"
      - "Oracle ERP Cloud"
      - "Dynamics 365 F&O"
      - "Multiple ERP systems (cross-vendor)"

# === DISTRIBUTION ===
canonical_source: "https://knowledgelib.io/business/erp-integration/erp-event-driven-comparison/2026"
suggested_citation: "Source: knowledgelib.io — AI Knowledge Library (verified 2026-03-02)"

# === RELATED UNITS ===
related_kos:
  depends_on:
    - id: "business/erp-integration/erp-rest-api-comparison/2026"
      label: "REST API comparison across ERP vendors"
  related_to:
    - id: "business/erp-integration/salesforce-streaming-platform-events/2026"
      label: "Salesforce Platform Events and Streaming API deep-dive"
    - id: "business/erp-integration/sap-event-mesh-capabilities/2026"
      label: "SAP Event Mesh capabilities and configuration"
    - id: "business/erp-integration/sap-integration-suite-capabilities/2026"
      label: "SAP Integration Suite including Advanced Event Mesh"
  solves:
    - id: "business/erp-integration/erp-rate-limits-comparison/2026"
      label: "Rate limits comparison — event throughput limits included"
  alternative_to:
    - id: "business/erp-integration/erp-bulk-import-comparison/2026"
      label: "Bulk import comparison for high-volume batch patterns"
  often_confused_with:
    - id: "business/erp-integration/erp-rest-api-comparison/2026"
      label: "REST API comparison — synchronous request/response, not event-driven"

# === SOURCES ===
sources:
  - id: src1
    title: "Event-Driven Architecture Decision Guide"
    author: Salesforce
    url: https://architect.salesforce.com/docs/architect/decision-guides/guide/event-driven
    type: official_docs
    published: 2025-06-15
    reliability: authoritative
  - id: src2
    title: "Design Considerations for Change Data Capture and Platform Events"
    author: Salesforce
    url: https://developer.salesforce.com/blogs/2022/10/design-considerations-for-change-data-capture-and-platform-events
    type: technical_blog
    published: 2022-10-19
    reliability: high
  - id: src3
    title: "SAP Event Mesh vs SAP Integration Suite, Advanced Event Mesh"
    author: SAP Community
    url: https://community.sap.com/t5/technology-blog-posts-by-members/sap-event-mesh-vs-sap-integration-suite-advanced-event-mesh/ba-p/13732769
    type: community_resource
    published: 2024-08-12
    reliability: moderate_high
  - id: src4
    title: "Event-Driven Architecture — A Deeper Look at SAP Solutions"
    author: RB Omnishore
    url: https://rb-omnishore.de/en/2025/08/15/event-driven-architecture-3-a-deeper-look-at-sap-solutions/
    type: technical_blog
    published: 2025-08-15
    reliability: moderate_high
  - id: src5
    title: "Oracle ERP Cloud Adapter Capabilities — Business Events"
    author: Oracle
    url: https://docs.oracle.com/en/cloud/paas/application-integration/erp-adapter/oracle-erp-cloud-adapter-capabilities.html
    type: official_docs
    published: 2025-01-15
    reliability: authoritative
  - id: src6
    title: "Subscribe to Finance and Operations Events in Dataverse"
    author: Microsoft
    url: https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/business-events/how-to/how-to-dataverse-events
    type: official_docs
    published: 2026-01-15
    reliability: authoritative
  - id: src7
    title: "How to Work Within Platform Events Delivery Limits"
    author: Salesforce
    url: https://developer.salesforce.com/blogs/2021/08/how-to-work-within-platform-events-delivery-limits
    type: technical_blog
    published: 2021-08-12
    reliability: high
---

# ERP Event-Driven Integration Comparison: Platform Events vs Event Mesh vs CDC vs Business Events

## TL;DR

- **Bottom line**: Every major ERP vendor now offers event-driven integration, but the architectures differ fundamentally — Salesforce provides a native event bus with Platform Events and CDC, SAP offers a standalone event broker (Event Mesh / Advanced Event Mesh), Oracle uses callback-based Business Events through OIC, and Dynamics 365 routes through Dataverse. Choose based on your latency needs, event volume, and whether you need cross-vendor eventing.
- **Key limit**: Salesforce Platform Events max 1 MB payload with 3-day replay retention; SAP Event Mesh caps at 1 MB messages and 10 GB storage; Oracle Business Events require OIC for consumption; Dynamics 365 Data Events only support PostOperation/Async execution.
- **Watch out for**: Delivery allocations are the hidden bottleneck — Salesforce caps event deliveries separately from publishing (delivery limits are often 1/44th of publishing limits), and SAP Event Mesh storage fills up silently if consumers lag behind.
- **Best for**: Teams evaluating which ERP event-driven pattern to adopt, or architects designing cross-ERP event-driven integrations that need to understand each vendor's delivery guarantees, retention, and throughput constraints.
- **Authentication**: Each system uses its own auth — Salesforce OAuth 2.0 + Pub/Sub API (gRPC), SAP OAuth 2.0 + AMQP/MQTT/REST, Oracle OIC token-based, Dynamics 365 Dataverse plug-in registration via Azure AD.

## System Profile

This comparison card covers the event-driven integration capabilities of four major ERP platforms as of early 2026. Each vendor has a distinct architecture: Salesforce's event bus is embedded in the platform, SAP provides a separate event broker service, Oracle relies on its integration cloud for event subscription, and Microsoft routes events through Dataverse. This card does NOT cover Workday (which lacks a native event broker), NetSuite (limited to User Event SuiteScripts), or on-premise-only ERP systems.

| System | Role | Event Mechanism | Protocol | Direction |
|---|---|---|---|---|
| Salesforce (API v62.0) | CRM/Platform — native event bus | Platform Events, CDC, Pub/Sub API | CometD, gRPC (Pub/Sub API) | Publish + Subscribe |
| SAP S/4HANA Cloud (2408) | ERP — external event broker | SAP Event Mesh / Advanced Event Mesh | AMQP 1.0, MQTT 3.1.1, REST/Webhook | Publish + Subscribe |
| Oracle ERP Cloud (24B) | ERP — callback-based events | Business Events via OIC Adapter | SOAP callback + REST enrichment | Publish (OIC subscribes) |
| Dynamics 365 F&O (10.0.40+) | ERP — Dataverse-routed events | Business Events + Data Events | Dataverse plug-in SDK, Power Automate | Publish via Dataverse |

## API Surfaces & Capabilities

| Event Mechanism | Vendor | Protocol | Best For | Max Payload | Retention | Replay? | Guaranteed Delivery? |
|---|---|---|---|---|---|---|---|
| Platform Events | Salesforce | gRPC (Pub/Sub API), CometD | Custom business events, inter-app messaging | 1 MB | 3 days | Yes (ReplayId) | At-least-once (with replay) |
| Change Data Capture (CDC) | Salesforce | gRPC (Pub/Sub API), CometD | Record-level change tracking (create/update/delete/undelete) | 1 MB | 3 days | Yes (ReplayId) | At-least-once (with replay) |
| SAP Event Mesh | SAP | AMQP 1.0, MQTT 3.1.1, REST | Lightweight event-driven integration | 1 MB | Queue-based (10 GB total) | No | At-least-once (queue persistence) |
| SAP Advanced Event Mesh | SAP (Solace) | AMQP, MQTT, REST, WebSocket | High-throughput, global event mesh, event replay | 30 MB | Queue-based (6 TB total) | Yes | At-least-once (persistent) |
| Business Events | Oracle | SOAP callback via OIC | ERP module event subscriptions (PO, Invoice, GL) | Callback payload (variable) | OIC-managed | OIC retry | OIC retry policy |
| Business Events | Dynamics 365 | Dataverse SDK | Finance process notifications (journal posted, PO created) | Dataverse entity record | Dataverse-managed | Power Automate retry | Async plug-in retry |
| Data Events (CUD) | Dynamics 365 | Dataverse SDK | Virtual entity change tracking (create/update/delete) | Virtual entity record | Dataverse-managed | No native replay | Async plug-in retry |

[src1, src3, src4, src5, src6]

## Rate Limits & Quotas

### Event Publishing Limits

| System | Mechanism | Hourly Publish Limit | Daily Publish Limit | Notes |
|---|---|---|---|---|
| Salesforce (Enterprise) | Platform Events | ~250K/hour | Up to 6.6M/day | Varies by edition; add-on licenses increase allocation |
| Salesforce (Enterprise) | CDC | No separate publish limit | Shared allocation with Platform Events | CDC publishes automatically on record changes |
| SAP Event Mesh | Queue/Topic publish | No hard hourly cap | Throughput-bound by broker capacity | 10 GB storage cap is the effective limit |
| SAP Advanced Event Mesh | Queue/Topic publish | No hard hourly cap | Throughput-bound by broker tier | 6 TB storage; dedicated broker instances |
| Oracle ERP Cloud | Business Events | No hourly cap documented | Module-specific (event-by-event enable) | Events fire on business transactions only |
| Dynamics 365 F&O | Business/Data Events | No hourly cap documented | No hard daily cap | Throttled by Dataverse plug-in queue |

[src1, src4, src7]

### Event Delivery / Consumption Limits

| System | Mechanism | Delivery Allocation | Concurrent Subscribers | Key Constraint |
|---|---|---|---|---|
| Salesforce | Platform Events + CDC | ~150K deliveries/day (base); add-on adds 100K/day | 2,000 CometD clients org-wide | Delivery limit is far lower than publish limit — the #1 surprise |
| SAP Event Mesh | Queue consumers | No per-consumer cap | Limited by queue count (per plan) | 10 GB storage fills up if consumers lag — messages dropped |
| SAP Advanced Event Mesh | Queue consumers | No per-consumer cap | Scales with broker tier | 6 TB storage; event replay available |
| Oracle ERP Cloud | OIC subscription | OIC process count (per license tier) | 1 OIC instance per event subscription | OIC license tier determines throughput ceiling |
| Dynamics 365 F&O | Dataverse plug-in | Async plug-in queue capacity | Multiple plug-in registrations per event | Async-only for virtual entity events |

[src1, src7, src3, src5, src6]

### Payload & Retention Limits

| System | Max Event Payload | Retention Period | Replay Capability | Delivery Semantics |
|---|---|---|---|---|
| Salesforce Platform Events | 1 MB | 3 days | Yes — ReplayId-based (Pub/Sub API or CometD) | At-least-once |
| Salesforce CDC | 1 MB | 3 days | Yes — ReplayId-based | At-least-once |
| SAP Event Mesh | 1 MB | Queue-based (10 GB total storage) | No native replay | At-least-once (queue persistence) |
| SAP Advanced Event Mesh | 30 MB | Queue-based (6 TB total storage) | Yes — event replay supported | At-least-once (persistent queues) |
| Oracle Business Events | Variable (callback) | OIC-managed (configurable retry) | OIC error hospital for failed deliveries | At-least-once (OIC retry) |
| Dynamics 365 Business Events | Dataverse record | Dataverse-managed | No native replay; use Dataverse audit log | At-least-once (async plug-in retry) |

[src1, src3, src4, src5, src6]

## Authentication

| System | Event Auth Flow | Token Lifetime | Protocol Auth | Notes |
|---|---|---|---|---|
| Salesforce Pub/Sub API | OAuth 2.0 (JWT bearer or web server flow) | Session timeout (default 2h) | gRPC with OAuth bearer token | Recommended for server-to-server event consumption |
| Salesforce CometD | OAuth 2.0 + session token | Session-based | HTTP long-poll with session ID | Legacy; migrate to Pub/Sub API |
| SAP Event Mesh | OAuth 2.0 (client credentials) | Token lifetime per BTP config | AMQP SASL PLAIN or OAuth, MQTT username/password | BTP service key provides credentials |
| SAP Advanced Event Mesh | OAuth 2.0 or broker-native auth | Configurable per broker | AMQP, MQTT, REST with broker credentials | Solace-managed broker credentials |
| Oracle OIC | OAuth 2.0 JWT User Assertion or token-based | Token-based with auto-refresh | SOAP callback with encrypted session token | Token never persisted; self-generated |
| Dynamics 365 Dataverse | Azure AD / Microsoft Entra ID | Access token (1h), refresh token | Dataverse SDK authentication | Plug-in runs in Dataverse security context |

[src1, src3, src5, src6]

### Authentication Gotchas

- Salesforce Pub/Sub API requires a connected app with specific event permissions — the integration user must have "Subscribe to Platform Events" permission on each event object. [src1]
- SAP Event Mesh credentials are BTP service keys — rotating them requires updating all connected consumers simultaneously. [src3]
- Oracle OIC event subscriptions use token-based auth with automatic refresh, but private endpoints do NOT support Business Events — you cannot use VCN private subnets for event consumption. [src5]
- Dynamics 365 Dataverse plug-ins run in the system security context — field-level security is not enforced on event payloads, which can expose sensitive data. [src6]

## Constraints
<!-- Agents: read this section before recommending any integration approach from this unit.
     These are hard constraints that must not be violated. -->

- Salesforce Platform Events delivery allocation is separate from (and much lower than) publishing allocation — you can publish 6.6M events/day but may only deliver 150K. This is the single biggest trap in Salesforce event-driven integrations. [src7]
- Salesforce CDC publishes ALL record changes including those from batch Apex, ETL jobs, and data loads — you cannot selectively suppress CDC events at publish time (use Filtered Streams at delivery instead). [src2]
- SAP Event Mesh has a hard 10 GB storage ceiling — once reached, new messages are rejected until consumers drain the queues. There is no automatic overflow to disk or secondary storage. [src4]
- SAP Advanced Event Mesh is a separately licensed product from SAP Event Mesh — upgrading requires a new BTP subscription and consumer re-pointing. [src3]
- Oracle Business Events are consumed exclusively through Oracle Integration Cloud (OIC) adapters — there is no standalone webhook or direct API subscription. You must have an OIC license. [src5]
- Dynamics 365 Data Events only support PostOperation stage and Asynchronous execution mode — PreValidation, PreOperation, and Synchronous execution are not supported for virtual entity events. [src6]
- No vendor provides a native cross-vendor event mesh — integrating events between Salesforce and SAP (for example) requires a third-party broker (Kafka, Solace, MuleSoft) or custom middleware.

## Integration Pattern Decision Tree

```
START — Architect needs event-driven integration across ERP systems
├── How many ERP systems are involved?
│   ├── Single ERP → use that vendor's native event mechanism
│   │   ├── Salesforce → Platform Events (custom) or CDC (record changes)
│   │   │   ├── Custom business events → Platform Events + Pub/Sub API
│   │   │   ├── Record change tracking → Change Data Capture
│   │   │   └── Need both → CDC for changes + Platform Events for orchestration
│   │   ├── SAP S/4HANA → Event Mesh or Advanced Event Mesh
│   │   │   ├── < 10 GB daily event volume → SAP Event Mesh (BTP)
│   │   │   ├── > 10 GB or need replay → SAP Advanced Event Mesh
│   │   │   └── Legacy SAP ECC → Event Add-On for ERP (AEM only)
│   │   ├── Oracle ERP Cloud → Business Events via OIC
│   │   │   ├── Standard module events → subscribe in OIC adapter wizard
│   │   │   └── Custom events → Application Composer → OIC subscription
│   │   └── Dynamics 365 F&O → Business Events + Data Events
│   │       ├── Business process notifications → Business Events catalog
│   │       └── Entity-level CUD tracking → Data Events via virtual entities
│   └── Multiple ERPs → need event broker / iPaaS
│       ├── Already have iPaaS?
│       │   ├── MuleSoft → Anypoint Platform event connectors
│       │   ├── Boomi → Event-driven architecture flows
│       │   └── Workato → Recipe triggers for each ERP
│       ├── Need dedicated event mesh?
│       │   ├── SAP Advanced Event Mesh (Solace) → works with non-SAP via AMQP/MQTT
│       │   ├── Confluent / Apache Kafka → universal event backbone
│       │   └── Solace PubSub+ → multi-protocol event mesh
│       └── Lightweight?
│           └── Custom: Salesforce Platform Events → webhook → target ERP API
├── What delivery guarantee do you need?
│   ├── At-least-once (with replay) → Salesforce Pub/Sub API, SAP AEM, Oracle OIC retry
│   ├── At-least-once (queue) → SAP Event Mesh, Dynamics 365 async plug-in
│   └── Exactly-once → NOT natively supported by any vendor — implement idempotency at consumer
└── What's the event volume?
    ├── < 10K events/day → any vendor's native mechanism works
    ├── 10K-100K events/day → watch Salesforce delivery allocations; SAP Event Mesh OK
    └── > 100K events/day → SAP AEM, Kafka, or Solace; Salesforce needs add-on license
```

## Quick Reference

| Capability | Salesforce | SAP S/4HANA | Oracle ERP Cloud | Dynamics 365 F&O | Notes |
|---|---|---|---|---|---|
| **Native Event Mechanism** | Platform Events + CDC | Event Mesh / AEM | Business Events (OIC) | Business Events + Data Events | All cloud-native |
| **CDC Capability** | Yes (native CDC) | Yes (via AEM Event Add-On) | Limited (OIC-based) | Yes (Data Events on virtual entities) | SF most mature CDC |
| **Custom Events** | Yes (Platform Events) | Yes (custom topics) | Yes (Application Composer) | Yes (custom Business Events) | All support custom |
| **Max Payload** | 1 MB | 1 MB (EM) / 30 MB (AEM) | Variable (callback) | Dataverse record | SAP AEM most generous |
| **Retention** | 3 days | Queue-based (10 GB / 6 TB) | OIC-managed | Dataverse-managed | SF clearest SLA |
| **Replay** | Yes (ReplayId) | No (EM) / Yes (AEM) | OIC error hospital | No native | SF + SAP AEM best |
| **Protocols** | gRPC, CometD | AMQP, MQTT, REST | SOAP callback | Dataverse SDK | SAP most protocol options |
| **Delivery Guarantee** | At-least-once | At-least-once | OIC retry | Async retry | None offer exactly-once |
| **Cross-Vendor Eventing** | No | AEM works cross-vendor | No | No | SAP AEM only cross-vendor |
| **Pricing Model** | Included + add-on tiers | BTP subscription | OIC license tier | Included with F&O | SF + SAP have add-ons |
| **Subscriber Limit** | 2,000 CometD clients | Broker-tier dependent | OIC instance count | Plug-in registrations | SF most restrictive |
| **Setup Complexity** | Low (declarative) | Medium (BTP config) | Medium (OIC wizard) | Medium (Visual Studio) | SF easiest to start |

[src1, src2, src3, src4, src5, src6]

## Step-by-Step Integration Guide

### 1. Evaluate event volume and delivery requirements

Before choosing a vendor-specific mechanism, calculate your daily event volume and required delivery guarantees. Map each integration flow to an event pattern. [src1]

```
Event Volume Assessment Checklist:
1. Count distinct event types (e.g., OrderCreated, InvoicePosted, StockChanged)
2. Estimate daily volume per event type
3. Sum total daily events across all types
4. Determine max acceptable delivery latency (seconds, minutes, hours)
5. Determine delivery guarantee needed (at-least-once vs best-effort)
6. Check if replay/redelivery is required for failure recovery
7. Count number of consumers per event type
8. Calculate: total_deliveries = events * consumers_per_event
```

**Verify**: `total_deliveries` falls within your chosen vendor's delivery allocation.

### 2. Configure Salesforce Platform Events (if using Salesforce)

Create a custom Platform Event and subscribe via Pub/Sub API. [src1, src2]

```bash
# Create a Platform Event via Metadata API or Setup UI
# Then subscribe via Pub/Sub API (gRPC):
# 1. Authenticate
curl -X POST https://login.salesforce.com/services/oauth2/token \
  -d "grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer" \
  -d "assertion=${JWT_TOKEN}"

# 2. Subscribe using Pub/Sub API gRPC client
# Python example uses salesforce-pub-sub-api package
# See Code Examples section below
```

**Verify**: Check event monitor in Setup > Platform Events > [Your Event] > Subscriptions

### 3. Configure SAP Event Mesh (if using SAP)

Create a service instance in BTP and subscribe to S/4HANA events. [src3, src4]

```bash
# 1. Create Event Mesh service instance in BTP cockpit
# 2. Create a service key for client credentials
# 3. Subscribe to S/4HANA events using AMQP 1.0:
#    - Topic pattern: sap/S4HANACLOUD/1234/ce/sap/s4/beh/purchaseorder/v1/PurchaseOrder/Created/v1
# 4. Consume messages from a queue bound to the topic

# Test with REST API:
curl -X GET "https://{emhost}/messagingrest/v1/queues/{queue}/messages/consumption" \
  -H "Authorization: Bearer ${ACCESS_TOKEN}" \
  -H "x-qos: 1"
```

**Verify**: Check Event Mesh dashboard in BTP cockpit for message throughput

### 4. Configure Oracle Business Events (if using Oracle)

Subscribe to Business Events in Oracle Integration Cloud adapter. [src5]

```
# In Oracle Integration Cloud:
# 1. Create a new integration flow
# 2. Add Oracle ERP Cloud Adapter as trigger connection
# 3. In Adapter Configuration Wizard, select "Subscribe to Business Events"
# 4. Choose the event (e.g., PO Created, Invoice Approved)
# 5. Configure callback service for event enrichment
# 6. Map event payload to target system
```

**Verify**: Check OIC Monitoring > Integrations for event delivery status

### 5. Configure Dynamics 365 Data Events (if using D365)

Register a Dataverse plug-in for Finance & Operations entity events. [src6]

```
# In Visual Studio with Power Platform Tools:
# 1. Create Power Platform Solution project
# 2. Connect to Dataverse environment linked to F&O
# 3. In Power Platform Explorer > Event Catalog > finance and operations
# 4. Right-click the entity event (Created/Updated/Deleted)
# 5. Select "Add Plugin" > Register New Step
# 6. Set: PostOperation, Asynchronous
# 7. Write business logic in ExecuteCdsPlugin method
# 8. Build and Deploy to Dataverse
```

**Verify**: Check Power Apps > Plug-in assemblies and F&O > Business Events > Active events tab

## Code Examples

### Python: Subscribe to Salesforce Platform Events via Pub/Sub API

```python
# Input:  Salesforce connected app credentials (client_id, private_key, username)
# Output: Real-time stream of Platform Event messages

import grpc
from google.protobuf import empty_pb2
# pip install salesforce-pub-sub-api==1.0.0

# 1. Authenticate via JWT Bearer flow
import requests
import jwt
import time

private_key = open("server.key", "r").read()
claim = {
    "iss": CLIENT_ID,
    "sub": USERNAME,
    "aud": "https://login.salesforce.com",
    "exp": int(time.time()) + 300
}
assertion = jwt.encode(claim, private_key, algorithm="RS256")

token_resp = requests.post(
    "https://login.salesforce.com/services/oauth2/token",
    data={
        "grant_type": "urn:ietf:params:oauth:grant-type:jwt-bearer",
        "assertion": assertion
    }
)
access_token = token_resp.json()["access_token"]
instance_url = token_resp.json()["instance_url"]

# 2. Connect to Pub/Sub API and subscribe
# The Pub/Sub API endpoint is: api.pubsub.salesforce.com:7443
# Use the generated gRPC stubs from Salesforce's proto files
# Subscribe with ReplayPreset.LATEST or a specific ReplayId for recovery

print(f"Connected. Listening for events on /event/YourEvent__e ...")
# Process events in streaming loop with ReplayId tracking for resilience
```

### JavaScript/Node.js: Consume SAP Event Mesh via AMQP

```javascript
// Input:  SAP BTP service key (clientid, clientsecret, tokenendpoint, uri)
// Output: Real-time consumption of S/4HANA events from Event Mesh queue

// npm install rhea@3.0.0 node-fetch@3.3.0
const rhea = require("rhea");
const fetch = require("node-fetch");

async function getToken(serviceKey) {
  const resp = await fetch(serviceKey.tokenendpoint, {
    method: "POST",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    body: `grant_type=client_credentials&client_id=${serviceKey.clientid}&client_secret=${serviceKey.clientsecret}`
  });
  return (await resp.json()).access_token;
}

async function consumeEvents(serviceKey, queueName) {
  const token = await getToken(serviceKey);
  const connection = rhea.connect({
    host: serviceKey.uri.replace("wss://", "").replace(":443", ""),
    port: 5671,  // AMQP over TLS
    transport: "tls",
    username: serviceKey.clientid,
    password: token
  });

  const receiver = connection.open_receiver(queueName);
  receiver.on("message", (context) => {
    const event = JSON.parse(context.message.body);
    console.log("Received event:", event.type, event.data);
    context.delivery.accept();  // Acknowledge message
  });

  receiver.on("receiver_error", (context) => {
    console.error("Receiver error:", context.receiver.error);
    // Implement reconnection with exponential backoff
  });
}
```

### cURL: Test Oracle Business Events callback

```bash
# Input:  Oracle Integration Cloud instance URL, integration flow ID
# Output: List of subscribed Business Events and their status

# Check OIC integration status
curl -X GET "https://{oic-instance}/ic/api/integration/v1/integrations/{integration-id}" \
  -H "Authorization: Bearer ${OIC_TOKEN}" \
  -H "Accept: application/json"

# Expected response includes activation status and event subscription details:
# { "status": "ACTIVATED", "eventSubscription": { "eventType": "PurchaseOrderEvent", ... } }

# Monitor recent event deliveries
curl -X GET "https://{oic-instance}/ic/api/integration/v1/monitoring/instances?integrationId={id}&status=COMPLETED&limit=10" \
  -H "Authorization: Bearer ${OIC_TOKEN}"
```

## Data Mapping

### Event Payload Structure Comparison

| Field Concept | Salesforce Platform Events | SAP Event Mesh | Oracle Business Events | D365 Data Events |
|---|---|---|---|---|
| Event type identifier | `/event/EventName__e` | Topic string (SAP namespace) | Business Event name (catalog) | Entity name + CUD operation |
| Payload format | JSON (Pub/Sub API) | JSON or binary (configurable) | SOAP XML callback | Dataverse entity record (JSON) |
| Timestamp | `CreatedDate` (UTC) | Message timestamp (UTC) | Callback invocation time | Dataverse audit timestamp |
| Unique event ID | `ReplayId` (opaque, sequential) | Message ID (broker-assigned) | OIC correlation ID | Dataverse plug-in execution ID |
| Source record ID | Custom field in event schema | Part of event payload | Callback enrichment service | Virtual entity primary key |
| Change type | Not built-in (custom field) | Part of CloudEvents `type` | Event name implies action | CUD operation type |
| Changed fields | CDC only (ChangeEventHeader) | Not built-in | Not built-in | Full entity record |

### Data Type Gotchas

- Salesforce Platform Events datetime fields are always UTC, but CDC `ChangeEventHeader.commitTimestamp` is the Salesforce server timestamp — not the user's timezone. [src2]
- SAP Event Mesh uses CloudEvents format by default for S/4HANA events — the actual business payload is nested inside the `data` property, not at the top level of the message. [src4]
- Oracle Business Events use a callback pattern — the initial event notification contains minimal data (often just an ID), and you must call the callback enrichment service to get the full payload. [src5]
- Dynamics 365 Data Events deliver the full virtual entity record, including computed fields, which can significantly increase payload size compared to sending only changed fields. [src6]

## Error Handling & Failure Points

### Common Error Scenarios

| Scenario | Salesforce | SAP Event Mesh | Oracle OIC | Dynamics 365 |
|---|---|---|---|---|
| Rate/delivery limit exceeded | Error: `PLATFORM_EVENT_DELIVERY_LIMIT_EXCEEDED`; events still published but not delivered | Messages rejected when 10 GB storage full | OIC throttles based on license tier | Async plug-in queue backlog |
| Consumer offline | Events stored for 3-day replay window | Messages queue until storage limit | OIC retries per policy; fails to error hospital | Async retry; fails to plug-in trace log |
| Payload too large | Publish fails: 1 MB limit | Message rejected: 1 MB (EM) / 30 MB (AEM) | Callback payload variable | Dataverse record size limits |
| Authentication failure | 401 on Pub/Sub API connection | AMQP connection refused; MQTT disconnect | OIC connection error; token refresh failure | Dataverse plug-in auth exception |
| Duplicate delivery | Consumer receives same ReplayId twice | Queue delivers same message on nack timeout | OIC may redeliver on timeout | Plug-in may re-execute on failure |

[src1, src3, src5, src6]

### Failure Points in Production

- **Salesforce delivery limit exhaustion**: Publishing succeeds silently but delivery stops once daily allocation is consumed. No error on publish side — consumers simply stop receiving events. Fix: `Monitor delivery usage via Setup > Platform Events > Usage; implement add-on license or reduce consumer count to lower delivery multiplier`. [src7]
- **SAP Event Mesh storage saturation**: When a consumer goes offline or lags behind, the 10 GB storage fills up. Once full, new messages are rejected with no automatic overflow. Fix: `Set up monitoring alerts on queue depth; implement a dead-letter queue pattern; consider upgrading to Advanced Event Mesh (6 TB) for production workloads`. [src4]
- **Oracle OIC event subscription breaks on private endpoint**: Private endpoints do NOT support Oracle ERP Cloud Business Events. Attempting to use a VCN private subnet for event consumption silently fails. Fix: `Use public OIC endpoints for Business Event subscriptions; private endpoints are only for invoke (outbound) operations`. [src5]
- **Dynamics 365 plug-in timeout**: Async plug-ins have a 2-minute execution timeout. Complex event processing logic that calls external APIs can hit this limit. Fix: `Keep plug-in logic lightweight; offload heavy processing to Azure Functions triggered by the plug-in via Azure Service Bus`. [src6]
- **Cross-vendor event ordering**: When routing events through an intermediate broker (Kafka, Solace) between two ERP systems, event ordering is only guaranteed within a single partition/queue. Multi-object event sequences (e.g., create customer then create order) can arrive out of order. Fix: `Use the same partition key for related events; implement a saga pattern with idempotent consumers`.

## Anti-Patterns

### Wrong: Polling for changes instead of using event-driven mechanisms

```python
# BAD -- polling every 5 minutes for record changes
# Wastes API calls, adds latency, misses sub-interval changes
import time
while True:
    changes = sf.query("SELECT Id, Name FROM Account WHERE SystemModstamp > " + last_check)
    process(changes)
    time.sleep(300)  # 5-minute poll interval
```

### Correct: Subscribe to Change Data Capture or Platform Events

```python
# GOOD -- CDC delivers changes in near-real-time, no wasted API calls
# Subscribe via Pub/Sub API with replay for resilience
subscriber.subscribe("/data/AccountChangeEvent", replay_id=last_replay_id)
# Events arrive within seconds of record change
# ReplayId enables recovery after consumer restart
```

### Wrong: Publishing high-volume CDC without checking delivery allocation

```python
# BAD -- enabling CDC on 50 high-volume objects without checking limits
# CDC publishes ALL changes including batch Apex, data loads
# 100K batch update = 100K CDC events = exhausts daily delivery allocation
for obj in high_volume_objects:
    enable_cdc(obj)  # Will overwhelm delivery limits
```

### Correct: Use Filtered Streams and selective CDC enablement

```python
# GOOD -- enable CDC only on objects that need real-time tracking
# Use Filtered Streams to filter at delivery time
# For batch/ETL objects, use scheduled queries instead
critical_objects = ["Opportunity", "Order", "Case"]  # Only objects that need real-time
for obj in critical_objects:
    enable_cdc(obj)
# Configure Filtered Streams to exclude system-generated changes
```

### Wrong: Using SAP Event Mesh without monitoring queue depth

```javascript
// BAD -- consuming events without monitoring storage
// Consumer goes offline for 2 hours during deployment
// Queue fills to 10 GB → new messages silently rejected
receiver.on("message", (ctx) => {
    processEvent(ctx.message);
    ctx.delivery.accept();
});
// No queue depth monitoring, no alerting
```

### Correct: Monitor queue depth and implement dead-letter queue

```javascript
// GOOD -- monitor queue depth and implement DLQ pattern
const QUEUE_DEPTH_THRESHOLD = 8_000_000_000; // 8 GB warning (of 10 GB max)

async function monitorAndConsume(serviceKey, queue) {
    // Check queue depth before starting consumer
    const stats = await getQueueStats(serviceKey, queue);
    if (stats.currentSizeBytes > QUEUE_DEPTH_THRESHOLD) {
        alertOps(`Queue ${queue} at ${(stats.currentSizeBytes/1e9).toFixed(1)} GB`);
    }
    // Consumer with DLQ for poison messages
    receiver.on("message", async (ctx) => {
        try {
            await processEvent(ctx.message);
            ctx.delivery.accept();
        } catch (e) {
            ctx.delivery.reject(); // Routes to DLQ after max retries
        }
    });
}
```

## Common Pitfalls

- **Confusing Salesforce event publishing with delivery**: Publishing an event and delivering it to subscribers are counted separately. You can publish millions of events but delivery allocation is much lower. Each subscriber delivery counts against the allocation, so 1 event delivered to 10 subscribers = 10 deliveries. Fix: `Minimize subscriber count per event type; use a single fan-out subscriber that redistributes events externally`. [src7]
- **SAP Event Mesh vs Advanced Event Mesh migration**: Moving from Event Mesh to Advanced Event Mesh is NOT an in-place upgrade. It requires a new BTP subscription, new broker instances, and re-pointing all producers/consumers. Fix: `Start with Advanced Event Mesh if you anticipate growth beyond 10 GB or need event replay; the migration cost is significant`. [src3]
- **Oracle Business Events not firing**: Business Events must be explicitly enabled per module and sometimes per profile option (e.g., AP events require enabling AP Profile Option). Events are not automatically available. Fix: `Check the Oracle ERP Cloud Business Events REST API catalog and ensure the specific event is activated for your module`. [src5]
- **Dynamics 365 synchronous expectation**: Virtual entity Data Events only support Asynchronous PostOperation execution. Developers expecting synchronous event processing (to validate or modify data before commit) will find their plug-ins silently ignored. Fix: `Design for eventual consistency; use Business Events (not Data Events) if you need pre-commit validation`. [src6]
- **No exactly-once delivery across vendors**: No ERP vendor provides native exactly-once event delivery. All provide at-least-once at best. Building an integration assuming exactly-once will lead to duplicate processing. Fix: `Implement idempotency keys at the consumer side — use the event's unique identifier (ReplayId, message ID, correlation ID) to deduplicate`.
- **Assuming CDC captures all changes equally**: Salesforce CDC captures DML from all sources (API, UI, Apex, batch), which means ETL bulk loads generate massive CDC streams. Oracle Business Events only fire on specific business transactions, not on all data changes. Fix: `Map your CDC requirements to the specific vendor's scope — not all CDC is equal across vendors`. [src2, src5]

## Diagnostic Commands

```bash
# === Salesforce: Check Platform Events delivery usage ===
# Setup > Platform Events > [Event Name] > check "Event Usage" section
# Or via Tooling API:
curl "https://{instance}/services/data/v62.0/tooling/query?q=SELECT+Id,Name+FROM+PlatformEventUsageMetric" \
  -H "Authorization: Bearer ${SF_TOKEN}"

# === SAP Event Mesh: Check queue depth and message statistics ===
curl "https://{emhost}/messagingrest/v1/queues/{queueName}" \
  -H "Authorization: Bearer ${SAP_TOKEN}" \
  -H "Accept: application/json"
# Response includes: messageCount, currentSizeBytes, consumers

# === Oracle OIC: Check integration flow event delivery status ===
curl "https://{oic-instance}/ic/api/integration/v1/monitoring/instances?integrationId={id}&status=FAILED&limit=20" \
  -H "Authorization: Bearer ${OIC_TOKEN}"

# === Dynamics 365: Check Business Event catalog and active events ===
# F&O: System Administration > Setup > Business events > Business event catalog
# Or via Dataverse Web API:
curl "https://{org}.crm.dynamics.com/api/data/v9.2/msdyn_businesseventdefinitions" \
  -H "Authorization: Bearer ${D365_TOKEN}"
```

## Version History & Compatibility

| System | Capability | GA Version | Status (2026) | Key Change |
|---|---|---|---|---|
| Salesforce Platform Events | Native event bus | Winter '17 (API v38.0) | GA — mature | Pub/Sub API (gRPC) added Summer '22 |
| Salesforce CDC | Change Data Capture | Spring '19 (API v45.0) | GA — mature | Filtered Streams added Winter '23 |
| Salesforce Pub/Sub API | gRPC event interface | Summer '22 (API v55.0) | GA — recommended | Replaces CometD for new implementations |
| SAP Event Mesh | BTP event broker | 2019 | GA — basic tier | Being complemented by Advanced Event Mesh |
| SAP Advanced Event Mesh | Solace-powered broker | 2023 | GA — enterprise tier | Event Studio planned early 2026 |
| SAP Event Add-On for ERP | S/4HANA + ECC connector | 2024 | GA (AEM only) | Enables legacy ECC event publishing |
| Oracle Business Events | OIC event subscription | 17D (2017) | GA — expanding modules | Token-based auth and MTOM added 25.02 |
| Dynamics 365 Business Events | F&O notifications | 10.0.22 (2021) | GA | Data Events added for virtual entities |
| Dynamics 365 Data Events | Virtual entity CUD | 10.0.30+ (2023) | GA | PostOperation/Async only |

[src1, src3, src4, src5, src6]

### Deprecation Notes

- **Salesforce**: PushTopic and Generic Events are deprecated — Salesforce will not invest further in these legacy technologies. Migrate to Platform Events + Pub/Sub API. [src1]
- **SAP**: SAP Event Mesh is not deprecated but is positioned as the entry-level tier. Advanced Event Mesh is the strategic direction for enterprise event-driven architectures. [src3]
- **Oracle**: Business Events delivery model is stable. OIC adapter capabilities expand with each Oracle Cloud release (typically 4 releases/year). [src5]
- **Microsoft**: Business Events and Data Events are actively developed. The Power Platform convergence strategy means Dataverse is the strategic event routing layer. [src6]

## When to Use / When Not to Use

| Use When | Don't Use When | Use Instead |
|---|---|---|
| Need near-real-time event notifications from ERP system changes | Need bulk data migration or ETL (>100K records) | business/erp-integration/erp-bulk-import-comparison/2026 |
| Building loosely-coupled integrations that should survive source system downtime | Need synchronous request-response with immediate confirmation | business/erp-integration/erp-rest-api-comparison/2026 |
| Multiple consumers need the same event data independently | Only one consumer needs data from one ERP system | Direct REST API integration is simpler |
| Need audit trail / replay capability for integration recovery | Data freshness is not critical (daily sync acceptable) | Scheduled batch integration patterns |
| Implementing saga/choreography patterns across ERP systems | Simple point-to-point data replication | CDC replication tools (Striim, Fivetran, Debezium) |

## Cross-System Comparison

| Capability | Salesforce | SAP S/4HANA | Oracle ERP Cloud | Dynamics 365 F&O | Notes |
|---|---|---|---|---|---|
| **Event Architecture** | Embedded event bus | External broker (BTP) | OIC adapter callbacks | Dataverse-routed | SF most self-contained |
| **CDC Native** | Yes (CDC) | Via AEM Event Add-On | Limited (module events only) | Data Events (virtual entities) | SF most comprehensive CDC |
| **Custom Events** | Platform Events (declarative) | Custom topics (code) | Application Composer | Custom Business Events (code) | SF easiest to create |
| **Protocol Options** | gRPC, CometD | AMQP, MQTT, REST, WebSocket | SOAP, REST (via OIC) | Dataverse SDK, Power Automate | SAP most protocols |
| **Max Payload** | 1 MB | 1 MB (EM) / 30 MB (AEM) | Variable (callback) | Dataverse record | SAP AEM most generous |
| **Replay / Redelivery** | Yes (3-day ReplayId) | No (EM) / Yes (AEM) | OIC error hospital | No native replay | SF clearest replay SLA |
| **Event Filtering** | Filtered Streams (delivery-side) | Topic-based routing | OIC mapping/filtering | Dataverse plug-in logic | SF most declarative |
| **Cross-Vendor Support** | No | Yes (AEM via AMQP/MQTT) | No (OIC-only) | No | SAP AEM is the only cross-vendor option |
| **Delivery Guarantee** | At-least-once | At-least-once | OIC retry policy | Async retry | None offer exactly-once |
| **Setup Complexity** | Low | Medium-High | Medium | Medium | SF lowest barrier to entry |
| **Licensing** | Included + add-on tiers | BTP subscription + AEM license | OIC license required | Included with F&O license | Oracle + SAP have significant add-on costs |
| **Maturity** | High (since 2017) | Medium (EM 2019, AEM 2023) | Medium (since 2017) | Medium (since 2021) | SF + Oracle most mature |

[src1, src3, src4, src5, src6]

## Important Caveats

- Event-driven capabilities vary dramatically by edition and licensing — Salesforce high-volume Platform Events and SAP Advanced Event Mesh are separately licensed products that can significantly increase cost.
- Delivery allocations (not just publishing limits) are the true bottleneck — particularly for Salesforce where delivery limits can be 1/44th of publishing limits and each subscriber counts as a separate delivery.
- No vendor provides native cross-vendor event mesh — the only vendor approaching this is SAP (via Advanced Event Mesh / Solace), but it still requires explicit configuration for non-SAP event sources.
- "CDC" means different things across vendors — Salesforce CDC is a comprehensive record-level change stream, Oracle "Business Events" are transaction-level notifications (not field-level CDC), and Dynamics 365 "Data Events" are CUD events on virtual entities. These are not interchangeable concepts.
- All event-driven architectures in ERP deliver at-least-once, never exactly-once. Consumer-side idempotency is always required for production-grade integrations.
- Rate limits, delivery allocations, and storage limits are subject to change with each vendor's release cycle. Always verify against current documentation before production implementation.

## Related Units

- [ERP REST API Comparison](/business/erp-integration/erp-rest-api-comparison/2026)
- [ERP Rate Limits Comparison](/business/erp-integration/erp-rate-limits-comparison/2026)
- [ERP Bulk Import Comparison](/business/erp-integration/erp-bulk-import-comparison/2026)
- [Salesforce Platform Events & Streaming API](/business/erp-integration/salesforce-streaming-platform-events/2026)
- [SAP Event Mesh Capabilities](/business/erp-integration/sap-event-mesh-capabilities/2026)
- [SAP Integration Suite Capabilities](/business/erp-integration/sap-integration-suite-capabilities/2026)
