Clarifies declarative vs. programmatic pub/sub approach

Addresses #994
This commit is contained in:
Mark Chmarny 2020-12-09 14:52:13 -08:00 committed by GitHub
parent cc715c865d
commit 5436651203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -66,9 +66,12 @@ spec:
## Step 2: Subscribe to topics
Dapr allows two methods by which you can subscribe to topics:
- **Declaratively**, where subscriptions are are defined in an external file.
- **Programatically**, where subscriptions are defined in user code
> Note, both, declarative and programatic approaches support the same features. The decelrative approach removes the Dapr dependancy from the user code and allows for the use of an existing application to subscribe to topic. The programmatic approach implements the subscription in user code.
### Declarative subscriptions
You can subscribe to a topic using the following Custom Resources Definition (CRD). Create a file named `subscription.yaml` and paste the following: