Default mappings

Updated at:
Copy as MD

EventBridge provides default message conversion rules for message inflow and outflow tasks. These rules automatically map the source message body to the destination input field, so you don't need to configure the transformation manually.

How it works

Each source service stores the message body in a different field within the event payload. The default mapping uses a JSONPath expression to extract the message body from the source event and pass it to the destination service. All default mappings use the Partial event pattern, which extracts a specific field rather than forwarding the entire event.

For example, when ApsaraMQ for RocketMQ is the source and ApsaraMQ for Kafka is the destination, EventBridge extracts the value at $.data.value from the source event and writes it to the Kafka message.

Same-service routing

If the source and destination are the same service type, refer to the following topics for the mappings:

Cross-service routing

When the source and destination are different services, the default mapping extracts only the message body from the source event. The following table shows the JSONPath expression used for each source-destination combination.

Source \ DestinationApsaraMQ for KafkaApsaraMQ for RocketMQApsaraMQ for RabbitMQApsaraMQ for MQTTSimple Message Queue (formerly MNS)Data Transmission Service (DTS)
Simple Message Queue (formerly MNS)$.data.value$.data.body$.data.body$.data.body--$.data
ApsaraMQ for RocketMQ$.data.value--$.data.body$.data.body$.data.messageBody$.data
ApsaraMQ for Kafka--$.data.body$.data.body$.data.body$.data.messageBody$.data
ApsaraMQ for RabbitMQ$.data.value$.data.body--$.data.body$.data.messageBody$.data
Function Compute$.data$.data$.data$.data$.data$.data
Simple Log Service$.data.value$.data.body$.data.body$.data.body$.data.messageBody$.data
DataHub$.data.value$.data.body$.data.body$.data.body$.data.messageBody$.data

JSONPath by destination

The destination service determines which JSONPath expression is used:

DestinationJSONPath
ApsaraMQ for Kafka$.data.value
ApsaraMQ for RocketMQ, RabbitMQ, or MQTT$.data.body
Simple Message Queue (formerly MNS)$.data.messageBody
Data Transmission Service (DTS)$.data

Function Compute is the exception: it maps to $.data for all destinations.