diff --git a/dsl-reference.md b/dsl-reference.md index 78e9f8c2..45fe74b4 100644 --- a/dsl-reference.md +++ b/dsl-reference.md @@ -532,6 +532,7 @@ Allows workflows to publish events to event brokers or messaging systems, facili | Name | Type | Required | Description | |:--|:---:|:---:|:---| | emit.event | [`eventProperties`](#event-properties) | `yes` | Defines the event to emit. | +| emit.cc | [`endpoint`](#endpoint) | `no` | Specifies an additional endpoint for emitting a carbon copy of the event. While the runtime's default cloud event endpoint remains the primary destination, setting this property ensures that the event is also published to the specified endpoint. Ideally, this property is left unset so that event delivery relies solely on the runtime's configured endpoint, but when provided, the event will be sent to both endpoints concurrently. | ##### Examples diff --git a/examples/emit-cc.yaml b/examples/emit-cc.yaml new file mode 100644 index 00000000..8a481a9e --- /dev/null +++ b/examples/emit-cc.yaml @@ -0,0 +1,20 @@ +document: + dsl: '1.0.0-alpha5' + namespace: test + name: emit + version: '0.1.0' +do: + - emitEvent: + emit: + event: + with: + source: https://petstore.com + type: com.petstore.order.placed.v1 + data: + client: + firstName: Cruella + lastName: de Vil + items: + - breed: dalmatian + quantity: 101 + cc: https://additional-cloud-event-sink.com/pub \ No newline at end of file diff --git a/schema/workflow.yaml b/schema/workflow.yaml index 4c83a175..8fcf0f57 100644 --- a/schema/workflow.yaml +++ b/schema/workflow.yaml @@ -491,6 +491,10 @@ $defs: description: Defines the properties of event to emit. required: [ source, type ] additionalProperties: true + cc: + $ref: '#/$defs/endpoint' + title: EmitCarbonCopyDefinition + description: Defines an additional endpoint, if any, to publish an event's carbon copy to. required: [ event ] forTask: type: object