From 5ba6f545db7c7cc45ba8281bfa90fbb5812b7eb1 Mon Sep 17 00:00:00 2001 From: zhangchao Date: Sun, 17 Sep 2023 11:51:11 +0800 Subject: [PATCH 1/5] add clientName and heartBeat Signed-off-by: zhangchao --- .../components-reference/supported-pubsub/setup-rabbitmq.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md index f2fecc6501c..89a098c4fe6 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md @@ -62,6 +62,10 @@ spec: value: false - name: ttlInSeconds value: 60 + - name: clientName + value: {podName} + - name: heartBeat + value: 10s ``` {{% alert title="Warning" color="warning" %}} @@ -96,6 +100,8 @@ The above example uses secrets as plain strings. It is recommended to use a secr | caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` | clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` | clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"` +| clientName | N | This RabbitMQ [client-provided connection name](https://www.rabbitmq.com/connections.html#client-provided-names) is a custom identifier. If set, the identifier will be mentioned in RabbitMQ server log entries and management UI. Can be set to {uuid}, {podName}, or {appID}, which is replaced by Dapr runtime to the real value. | `"app1"`, `{uuid}`, `{podName}`, `{appID}` +| heartBeat | N | Defines the heartbeat interval with the server, detecting the aliveness of the peer TCP connection with the RabbitMQ server. Defaults to `10s` . | `"10s"` ## Communication using TLS From 7fc9c4a248822e8bf99c3cd6b9d886b4813a2acb Mon Sep 17 00:00:00 2001 From: Mark Fussell Date: Sun, 24 Sep 2023 20:44:16 -0700 Subject: [PATCH 2/5] Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md Signed-off-by: Mark Fussell --- .../components-reference/supported-pubsub/setup-rabbitmq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md index 89a098c4fe6..f25a543a5f1 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md @@ -100,7 +100,7 @@ The above example uses secrets as plain strings. It is recommended to use a secr | caCert | Required for using TLS | Certificate Authority (CA) certificate in PEM format for verifying server TLS certificates. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` | clientCert | Required for using TLS | TLS client certificate in PEM format. Must be used with `clientKey`. | `"-----BEGIN CERTIFICATE-----\n\n-----END CERTIFICATE-----"` | clientKey | Required for using TLS | TLS client key in PEM format. Must be used with `clientCert`. Can be `secretKeyRef` to use a secret reference. | `"-----BEGIN RSA PRIVATE KEY-----\n\n-----END RSA PRIVATE KEY-----"` -| clientName | N | This RabbitMQ [client-provided connection name](https://www.rabbitmq.com/connections.html#client-provided-names) is a custom identifier. If set, the identifier will be mentioned in RabbitMQ server log entries and management UI. Can be set to {uuid}, {podName}, or {appID}, which is replaced by Dapr runtime to the real value. | `"app1"`, `{uuid}`, `{podName}`, `{appID}` +| clientName | N | This RabbitMQ [client-provided connection name](https://www.rabbitmq.com/connections.html#client-provided-names) is a custom identifier. If set, the identifier is mentioned in RabbitMQ server log entries and management UI. Can be set to {uuid}, {podName}, or {appID}, which is replaced by Dapr runtime to the real value. | `"app1"`, `{uuid}`, `{podName}`, `{appID}` | heartBeat | N | Defines the heartbeat interval with the server, detecting the aliveness of the peer TCP connection with the RabbitMQ server. Defaults to `10s` . | `"10s"` From ad50b794b0d0dff1cb58562352d3b0984ea1281f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Aguilar-Tablada=20Espinosa?= Date: Mon, 25 Sep 2023 05:52:01 +0200 Subject: [PATCH 3/5] Create 'quorum' queues in RabbitMQ (#3699) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create 'quorum' queues in RabbitMQ Signed-off-by: Álvaro Aguilar * Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Álvaro Aguilar-Tablada Espinosa * Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md Co-authored-by: Mark Fussell Signed-off-by: Álvaro Aguilar-Tablada Espinosa --------- Signed-off-by: Álvaro Aguilar Signed-off-by: Álvaro Aguilar-Tablada Espinosa Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Co-authored-by: Mark Fussell --- .../supported-pubsub/setup-rabbitmq.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md index f2fecc6501c..c966f69885a 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-rabbitmq.md @@ -412,6 +412,24 @@ client.PublishEvent(ctx, PUBSUB_NAME, TOPIC_NAME, []byte(strconv.Itoa(orderId)), {{< /tabs >}} +## Use quorum queues + +By default, Dapr creates `classic` queues. To create `quorum` queues, add the following metadata to your pub/sub [subscription]({{< ref subscription-schema.md >}}) + +```yaml +apiVersion: dapr.io/v2alpha1 +kind: Subscription +metadata: + name: pubsub +spec: + topic: checkout + routes: + default: /orders + pubsubname: order-pub-sub + metadata: + queueType: quorum +``` + ## Time-to-live You can set a time-to-live (TTL) value at either the message or component level. Set default component-level TTL using the component spec `ttlInSeconds` field in your component. From cbcda3f29c83c277499fd5f26cbb3f409fd8a161 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:52:50 -0400 Subject: [PATCH 4/5] Update daprdocs/content/en/reference/api/placement_api.md Co-authored-by: Mark Fussell Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- daprdocs/content/en/reference/api/placement_api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/api/placement_api.md b/daprdocs/content/en/reference/api/placement_api.md index bd7eee3cd0c..5aa47a965d5 100644 --- a/daprdocs/content/en/reference/api/placement_api.md +++ b/daprdocs/content/en/reference/api/placement_api.md @@ -8,7 +8,7 @@ weight: 1200 Dapr has an HTTP API `/placement/state` for placement service that exposes placement table information. The API is exposed on the sidecar on the same port as the healthz. This is an unauthenticated endpoint, and is disabled by default. -You need to set `DAPR_PLACEMENT_METADATA_ENABLED` environment or `metadata-enabled` command line args to true to enable it. If you are using helm, set `dapr_placement.metadataEnabled` to true. +You need to set either set`DAPR_PLACEMENT_METADATA_ENABLED` environment variable or `metadata-enabled` command line args on the Placement service to true to enable it. If you are using Helm for deployment of the Placement service then, set `dapr_placement.metadataEnabled` to true. ## Usecase From d202a515a11de14ac8ca4b0549340d7a84bad325 Mon Sep 17 00:00:00 2001 From: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Date: Mon, 25 Sep 2023 10:53:42 -0400 Subject: [PATCH 5/5] Update daprdocs/content/en/reference/environment/_index.md Co-authored-by: Mark Fussell Signed-off-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> --- daprdocs/content/en/reference/environment/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/environment/_index.md b/daprdocs/content/en/reference/environment/_index.md index f5081802f79..9ae9b7b22f1 100644 --- a/daprdocs/content/en/reference/environment/_index.md +++ b/daprdocs/content/en/reference/environment/_index.md @@ -27,4 +27,4 @@ The following table lists the environment variables used by the Dapr runtime, CL | OTEL_EXPORTER_OTLP_PROTOCOL | OpenTelemetry Tracing | The OTLP protocol to use Transport protocol. (`grpc`, `http/protobuf`, `http/json`) | | DAPR_COMPONENTS_SOCKETS_FOLDER | Dapr runtime and the .NET, Go, and Java pluggable component SDKs | The location or path where Dapr looks for Pluggable Components Unix Domain Socket files. If unset this location defaults to `/tmp/dapr-components-sockets` | | DAPR_COMPONENTS_SOCKETS_EXTENSION | .NET and Java pluggable component SDKs | A per-SDK configuration that indicates the default file extension applied to socket files created by the SDKs. Not a Dapr-enforced behavior. | -| DAPR_PLACEMENT_METADATA_ENABLED | Dapr placement | Enable an endpoint for the Placement service that exposes placement table information on actor usage. Set to `true` to enable. [Learn more about the Placement API]({{< ref placement_api.md >}}) | \ No newline at end of file +| DAPR_PLACEMENT_METADATA_ENABLED | Dapr placement | Enable an endpoint for the Placement service that exposes placement table information on actor usage. Set to `true` to enable in self-hosted mode. [Learn more about the Placement API]({{< ref placement_api.md >}}) | \ No newline at end of file