Open
Description
/area runtime
/area operator
/area placement
/area docs
/area test-and-release
/area injector
/area scheduler
/area sentry
Describe the proposal
Ability to configure Publish metadata for DLQ in Subscription spec:
- Currently, it is not possible to configure DLQ publish metadata other than the DLQ topic name itself. This is limiting as there is some important per-component type metadata config (e.g. rawPayload, serialization, etc...).
- There is a current convoluted and confusing loophole for components supporting headers and converting metadata to header in the publish message. These headers are converted back to metadata and have impact to the DLQ publishing but there is a high variability of the behavior depending on HOW these messages are published...
- The recommendation is therefore to allow configuring DLQ publish metadata within the subscription itself. Here is a suggested spec that is backwards compatible:
apiVersion: dapr.io/v2alpha1
kind: Subscription
metadata:
name: <REPLACE-WITH-NAME>
spec:
topic: <REPLACE-WITH-TOPIC-NAME> # Required
routes: # Required
rules:
- match: <REPLACE-WITH-CEL-FILTER>
path: <REPLACE-WITH-PATH>
pubsubname: <REPLACE-WITH-PUBSUB-NAME> # Required
deadLetterTopic: <REPLACE-WITH-DEADLETTERTOPIC-NAME> # Optional
deadLetterTopicPublishMetadata:
- name: valueSchemaType
value: Avro
- name: rawPayload
value: true
# [...]
scopes:
- <REPLACE-WITH-SCOPED-APPIDS>
If we wanted to introduce a 'cleaner' v3alpha1
version:
apiVersion: dapr.io/v2alpha1
kind: Subscription
metadata:
name: <REPLACE-WITH-NAME>
spec:
topic: <REPLACE-WITH-TOPIC-NAME> # Required
routes: # Required
rules:
- match: <REPLACE-WITH-CEL-FILTER>
path: <REPLACE-WITH-PATH>
pubsubname: <REPLACE-WITH-PUBSUB-NAME> # Required
deadLetterTopic: # Optional
name: <REPLACE-WITH-DLQ-TOPIC-NAME>
publishMetadata:
- name: valueSchemaType
value: Avro
- name: rawPayload
value: true
# [...]
scopes:
- <REPLACE-WITH-SCOPED-APPIDS>
Metadata
Metadata
Assignees
Labels
No labels