Publish a pub-sub event.
dapr publish [flags]
Name | Environment Variable | Default | Description |
---|---|---|---|
--publish-app-id , -i | The ID that represents the app from which you are publishing | ||
--pubsub , -p | The name of the pub/sub component | ||
--topic , -t | The topic to be published to | ||
--data , -d | The JSON serialized string (optional) | ||
--data-file , -f | A file containing the JSON serialized data (optional) | ||
--help , -h | Print this help message |
dapr publish --publish-app-id appId --topic sample --pubsub target --data '{"key":"value"}'