Updates based on feedback

This commit is contained in:
Mark Fussell 2021-01-12 10:48:05 -08:00
parent acc724fc3b
commit 71ce15688a
3 changed files with 18 additions and 31 deletions

View File

@ -5,7 +5,9 @@ linkTitle: "Apache Kafka"
description: "Detailed documentation on the Apache Kafka pubsub component"
---
## Format
## Component Format
To setup Apache Kafka pubsub, you create a component of type `pubsub.kafka`
```yaml
apiVersion: dapr.io/v1alpha1
@ -41,11 +43,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| saslUsername | N | Username used for authentication. Only required if authRequired is set to true | `"adminuser"`
| saslPassword | N | Password used for authentication. Can be `secretKeyRef` to use a secret reference. Only required if authRequired is set to true | `""`, `"KeFg23!"`
## Create a Dapr component
To setup Apache Kafka pubsub, you create a component of type `pubsub.kafka`
## Setup Kafka
## Create a Kafka instance
{{< tabs "Self-Hosted" "Kubernetes">}}
{{% codetab %}}
@ -60,10 +59,7 @@ To run Kafka on Kubernetes, you can use the [Helm Chart](https://github.com/helm
{{< /tabs >}}
## Apply the configuration
Visit [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components.
## Related links
- [Basic schema for a Dapr component]({{< ref component-schema >}})
- Read [this topic]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components
- [Pub/Sub building block]({{< ref pubsub >}})

View File

@ -5,7 +5,8 @@ linkTitle: "Azure Events Hub"
description: "Detailed documentation on the Azure Event Hubs pubsub component"
---
## Format
## Component Format
To setup Azure Event Hubs, you create a component of type `pubsub.azure.eventhubs`
```yaml
apiVersion: dapr.io/v1alpha1
@ -36,32 +37,27 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| Field | Required | Details | Example |
|--------------------|:--------:|---------|---------|
| connectionString | Y | Connection-string for the Event Hubs | `Endpoint=sb://{EventHubNamespace}.servicebus.windows.net/;SharedAccessKeyName={PolicyName};SharedAccessKey={Key};EntityPath={EventHub}`
| storageAccountName | Y | The storage account name to use for the EventProcessorHost |`"myeventhubstorage"`
| storageAccountName | Y | Storage account name to use for the EventProcessorHost |`"myeventhubstorage"`
| storageAccountKey | Y | Storage account key to use for the EventProcessorHost | `"112233445566778899"`
| storageContainerName | Y | The storage container name for the storage account name. | `"myeventhubstoragecontainer"`
| storageContainerName | Y | Storage container name for the storage account name. | `"myeventhubstoragecontainer"`
## Create a Dapr component
To setup Azure Event Hubs, you create a component of type `pubsub.azure.eventhubs`
## Setup Azure Event Hubs
## Create an Azure Event Hub
Follow the instructions [here](https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-create) on setting up Azure Event Hubs.
Since this implementation uses the Event Processor Host, you will also need an [Azure Storage Account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal). Follow the instructions [here](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-keys-manage) to manage the storage account access keys.
See [here](https://docs.microsoft.com/en-us/azure/event-hubs/authorize-access-shared-access-signature) on how to get the Event Hubs connection string. Note this is not the Event Hubs namespace.
## Create consumer groups for each subscriber
### Create consumer groups for each subscriber
For every Dapr app that wants to subscribe to events, create an Event Hubs consumer group with the name of the `dapr id`.
For example, a Dapr app running on Kubernetes with `dapr.io/app-id: "myapp"` will need an Event Hubs consumer group named `myapp`.
Note: Dapr passes the name of the Consumer group to the EventHub and so this is not supplied in the metadata.
## Apply the configuration
Visit [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components.
## Related links
- [Basic schema for a Dapr component]({{< ref component-schema >}})
- Read [this topic]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components
- [Pub/Sub building block]({{< ref pubsub >}})

View File

@ -6,7 +6,9 @@ description: "Detailed documentation on the Redis Streams pubsub component"
weight: 100
---
## Format
## Component Format
To setup Redis Streams pubsub, you create a component of type `pubsub.redis`
```yaml
apiVersion: dapr.io/v1alpha1
@ -41,11 +43,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr
| consumerID | N | The consumer group ID | `"myGroup"`
| enableTLS | N | If the Redis instance supports TLS with public certificates, can be configured to be enabled or disabled. Defaults to `"false"` | `"true"`, `"false"`
## Create a Dapr component
To setup Redis Streams pubsub, you create a component of type `pubsub.redis`
## Setup a Redis instance
## Create a Redis instance
Dapr can use any Redis instance - containerized, running on your local dev machine, or a managed cloud service, provided the version of Redis is 5.0.0 or later. If you already have a Redis instance > 5.0.0 installed, move on to the [Configuration](#configuration) section.
@ -102,14 +100,11 @@ You can use [Helm](https://helm.sh/) to quickly create a Redis instance in our K
{{< /tabs >}}
## Apply the configuration
{{% alert title="Note" color="primary" %}}
The Dapr CLI automatically deploys a redis instance and creates Dapr components as part of the `dapr init` command.
The Dapr CLI automatically deploys a local redis instance in self hosted mode as part of the `dapr init` command.
{{% /alert %}}
Visit [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components.
## Related links
- [Basic schema for a Dapr component]({{< ref component-schema >}})
- Read [this topic]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components
- [Pub/Sub building block]({{< ref pubsub >}})