mirror of https://github.com/dapr/docs.git
Fix cloudevent override properties (#3674)
Docs incorrectly use a dash `-` to separate the `cloudevent` and the `field` i.e. `cloudevent-id` it should be `cloudevent.id` Signed-off-by: Oliver Tomlinson <oliverjamestomlinson@gmail.com> Co-authored-by: Mark Fussell <markfussell@gmail.com>
This commit is contained in:
parent
518276b53c
commit
5385f7aa14
|
@ -82,12 +82,12 @@ As another example of a v1.0 CloudEvent, the following shows data as XML content
|
|||
|
||||
Dapr automatically generates several CloudEvent properties. You can replace these generated CloudEvent properties by providing the following optional metadata key/value:
|
||||
|
||||
- `cloudevent-id`: overrides `id`
|
||||
- `cloudevent-source`: overrides `source`
|
||||
- `cloudevent-type`: overrides `type`
|
||||
- `cloudevent-traceid`: overrides `traceid`
|
||||
- `cloudevent-tracestate`: overrides `tracestate`
|
||||
- `cloudevent-traceparent`: overrides `traceparent`
|
||||
- `cloudevent.id`: overrides `id`
|
||||
- `cloudevent.source`: overrides `source`
|
||||
- `cloudevent.type`: overrides `type`
|
||||
- `cloudevent.traceid`: overrides `traceid`
|
||||
- `cloudevent.tracestate`: overrides `tracestate`
|
||||
- `cloudevent.traceparent`: overrides `traceparent`
|
||||
|
||||
The ability to replace CloudEvents properties using these metadata properties applies to all pub/sub components.
|
||||
|
||||
|
@ -106,7 +106,7 @@ with DaprClient() as client:
|
|||
result = client.publish_event(
|
||||
pubsub_name='order_pub_sub',
|
||||
topic_name='orders',
|
||||
publish_metadata={'cloudevent-id: 'd99b228f-6c73-4e78-8c4d-3f80a043d317', cloudevent-source: 'payment'}
|
||||
publish_metadata={'cloudevent.id: 'd99b228f-6c73-4e78-8c4d-3f80a043d317', cloudevent.source: 'payment'}
|
||||
)
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue