diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md deleted file mode 100644 index 6f997f2b32a..00000000000 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-nats-streaming.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -type: docs -title: "NATS Streaming" -linkTitle: "NATS Streaming" -description: "Detailed documentation on the NATS Streaming pubsub component" -aliases: - - "/operations/components/setup-pubsub/supported-pubsub/setup-nats-streaming/" ---- - -## ⚠️ Deprecation notice - -{{% alert title="Warning" color="warning" %}} -This component is **deprecated** because the [NATS Streaming Server](https://nats-io.gitbook.io/legacy-nats-docs/nats-streaming-server-aka-stan/developing-with-stan) was deprecated in June 2023 and no longer receives updates. Users are encouraged to switch to using [JetStream]({{< ref setup-jetstream >}}) as an alternative. - -This component will be **removed in the Dapr v1.13 release**. -{{% /alert %}} - -## Component format - -To set up NATS Streaming pub/sub, create a component of type `pubsub.natsstreaming`. See the [pub/sub broker component file]({{< ref setup-pubsub.md >}}) to learn how ConsumerID is automatically generated. Read the [How-to: Publish and Subscribe guide]({{< ref "howto-publish-subscribe.md#step-1-setup-the-pubsub-component" >}}) on how to create and apply a pub/sub configuration. - -```yaml -apiVersion: dapr.io/v1alpha1 -kind: Component -metadata: - name: natsstreaming-pubsub -spec: - type: pubsub.natsstreaming - version: v1 - metadata: - - name: natsURL - value: "nats://localhost:4222" - - name: natsStreamingClusterID - value: "clusterId" - - name: concurrencyMode - value: parallel - - name: consumerID # Optional. If not supplied, runtime will create one. - value: "channel1" - # below are subscription configuration. - - name: subscriptionType - value: # Required. Allowed values: topic, queue. - - name: ackWaitTime - value: "" # Optional. - - name: maxInFlight - value: "" # Optional. - - name: durableSubscriptionName - value: "" # Optional. - # following subscription options - only one can be used - - name: deliverNew - value: - - name: startAtSequence - value: 1 - - name: startWithLastReceived - value: false - - name: deliverAll - value: false - - name: startAtTimeDelta - value: "" - - name: startAtTime - value: "" - - name: startAtTimeFormat - value: "" -``` - -{{% alert title="Warning" color="warning" %}} -The above example uses secrets as plain strings. It is recommended to [use a secret store for the secrets]({{< ref component-secrets.md >}}). -{{% /alert %}} - -## Spec metadata fields - -| Field | Required | Details | Example | -|--------------------|:--------:|---------|---------| -| natsURL | Y | NATS server address URL | "`nats://localhost:4222`"| -| natsStreamingClusterID | Y | NATS cluster ID |`"clusterId"`| -| subscriptionType | Y | Subscription type. Allowed values `"topic"`, `"queue"` | `"topic"` | -| consumerID | N | Consumer ID (consumer tag) organizes one or more consumers into a group. Consumers with the same consumer ID work as one virtual consumer; for example, a message is processed only once by one of the consumers in the group. If the `consumerID` is not provided, the Dapr runtime set it to the Dapr application ID (`appID`) value. | `"channel1"` -| ackWaitTime | N | See [here](https://docs.nats.io/developing-with-nats-streaming/acks#acknowledgements) | `"300ms"`| -| maxInFlight | N | See [here](https://docs.nats.io/developing-with-nats-streaming/acks#acknowledgements) | `"25"` | -| durableSubscriptionName | N | [Durable subscriptions](https://docs.nats.io/developing-with-nats-streaming/durables) identification name. | `"my-durable"`| -| deliverNew | N | Subscription Options. Only one can be used. Deliver new messages only | `"true"`, `"false"` | -| startAtSequence | N | Subscription Options. Only one can be used. Sets the desired start sequence position and state | `"100000"`, `"230420"` | -| startWithLastReceived | N | Subscription Options. Only one can be used. Sets the start position to last received. | `"true"`, `"false"` | -| deliverAll | N | Subscription Options. Only one can be used. Deliver all available messages | `"true"`, `"false"` | -| startAtTimeDelta | N | Subscription Options. Only one can be used. Sets the desired start time position and state using the delta | `"10m"`, `"23s"` | -| startAtTime | N | Subscription Options. Only one can be used. Sets the desired start time position and state | `"Feb 3, 2013 at 7:54pm (PST)"` | -| startAtTimeFormat | N | Must be used with `startAtTime`. Sets the format for the time | `"Jan 2, 2006 at 3:04pm (MST)"` | -| concurrencyMode | N | Call the subscriber sequentially (“single” message at a time), or concurrently (in “parallel”). Default: `"parallel"` | `"single"`, `"parallel"` - -## Create a NATS server - -{{< tabs "Self-Hosted" "Kubernetes">}} - -{{% codetab %}} -Run a NATS server locally using Docker: - -```bash -docker run -d --name nats-streaming -p 4222:4222 -p 8222:8222 nats-streaming -``` - -Interact with the server using the client port: `localhost:4222`. -{{% /codetab %}} - -{{% codetab %}} -Install NATS on Kubernetes by using the [kubectl](https://docs.nats.io/running-a-nats-service/introduction/running/nats-kubernetes/): - -```bash -# Single server NATS - -kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-server/single-server-nats.yml - -kubectl apply -f https://raw.githubusercontent.com/nats-io/k8s/master/nats-streaming-server/single-server-stan.yml -``` - -This installs a single NATS-Streaming and NATS into the `default` namespace. To interact with NATS, find the service with: - -```bash -kubectl get svc stan -``` - -For example, if installing using the example above, the NATS Streaming address would be: - -`:4222` - -{{% /codetab %}} - -{{< /tabs >}} - -## Related links - -- [Basic schema for a Dapr component]({{< ref component-schema >}}). -- Read [this guide]({{< ref "howto-publish-subscribe.md#step-2-publish-a-topic" >}}) for instructions on configuring pub/sub components. -- [Pub/Sub building block]({{< ref pubsub >}}). -- [NATS Streaming Deprecation Notice](https://github.com/nats-io/nats-streaming-server/#warning--deprecation-notice-warning). diff --git a/daprdocs/data/components/pubsub/generic.yaml b/daprdocs/data/components/pubsub/generic.yaml index 99fa5cd2013..b953aeab54f 100644 --- a/daprdocs/data/components/pubsub/generic.yaml +++ b/daprdocs/data/components/pubsub/generic.yaml @@ -46,14 +46,6 @@ features: bulkPublish: false bulkSubscribe: false -- component: NATS Streaming - link: setup-nats-streaming - state: Deprecated - version: v1 - since: "1.11" - features: - bulkPublish: false - bulkSubscribe: false - component: RabbitMQ link: setup-rabbitmq state: Stable