From 5436651203863f6003d2333b655cd29c28f11ebb Mon Sep 17 00:00:00 2001 From: Mark Chmarny Date: Wed, 9 Dec 2020 14:52:13 -0800 Subject: [PATCH 1/2] Clarifies declarative vs. programmatic pub/sub approach Addresses #994 --- .../building-blocks/pubsub/howto-publish-subscribe.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index 9221627bf..e3e8ddd93 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -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: From 1006936695da2db53011e93289f2c8c5ea7bdb9d Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 10 Dec 2020 11:03:32 -0800 Subject: [PATCH 2/2] Change to shortcode note and fix spelling --- .../building-blocks/pubsub/howto-publish-subscribe.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md index e3e8ddd93..6546e0c34 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md +++ b/daprdocs/content/en/developing-applications/building-blocks/pubsub/howto-publish-subscribe.md @@ -68,9 +68,11 @@ spec: 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 +- **Programmatically**, 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. +{{% alert title="Note" color="primary" %}} +Both declarative and programmatic approaches support the same features. The declarative approach removes the Dapr dependancy from the user code and allows for the use of an existing application to subscribe to topics. The programmatic approach implements the subscription in user code. +{{% /alert %}} ### Declarative subscriptions