Skip to content

Commit

Permalink
Merge branch 'main' into feat-lifecycle-cloud-events
Browse files Browse the repository at this point in the history
  • Loading branch information
cdavernas authored Jan 9, 2025
2 parents 7ac9dd5 + 8eebe90 commit 8886c3a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions dsl-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,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

Expand Down
20 changes: 20 additions & 0 deletions examples/emit-cc.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions schema/workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8886c3a

Please sign in to comment.