Apache Kafka
To setup Apache Kafka pubsub create a component of type . See this guide on how to create and apply a pubsub configuration. For details on using secretKeyRef
, see the guide on .
The param name is partitionKey
.
curl -X POST http://localhost:3500/v1.0/publish/myKafka/myTopic?metadata.partitionKey=key1 \
-H "Content-Type: application/json" \
-d '{
"data": {
"message": "Hi"
}'
You can run Kafka locally using this Docker image. To run without Docker, see the getting started guide .
- Basic schema for a Dapr component
- Read for instructions on configuring pub/sub components