mirror of https://github.com/dapr/docs.git
Signed-off-by: Phil Kedy <phil.kedy@gmail.com>
This commit is contained in:
parent
ae846747a9
commit
6079c0e34b
|
|
@ -136,6 +136,20 @@ curl -X POST http://localhost:3500/v1.0/publish/myKafka/myTopic?metadata.partiti
|
|||
}'
|
||||
```
|
||||
|
||||
### Message headers
|
||||
|
||||
All other metadata key/value pairs (that are not `partitionKey`) are set as headers in the Kafka message. For example, here is an example setting a `correlationId` for the message.
|
||||
|
||||
```shell
|
||||
curl -X POST http://localhost:3500/v1.0/publish/myKafka/myTopic?metadata.correlationId=myCorrelationID \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"data": {
|
||||
"message": "Hi"
|
||||
}
|
||||
}'
|
||||
```
|
||||
|
||||
## Create a Kafka instance
|
||||
|
||||
{{< tabs "Self-Hosted" "Kubernetes">}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue