8000 Ability to configure the Publish metadata for DLQ in Subscription spec · Issue #8831 · dapr/dapr · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Ability to configure the Publish metadata for DLQ in Subscription spec #8831
Open
@passuied

Description

@passuied

/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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0