mirror of https://github.com/dapr/docs.git
866 B
866 B
type | title | linkTitle | description |
---|---|---|---|
docs | publish CLI command reference | publish | Detailed information on the publish CLI command |
Description
Publish a pub-sub event.
Supported platforms
- [Self-Hosted]({{< ref self-hosted >}})
Usage
dapr publish [flags]
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) | ||
--help , -h |
Print this help message |
Examples
Publish to sample topic in target pubsub
dapr publish --publish-app-id appId --topic sample --pubsub target --data '{"key":"value"}'