Skip to content

Data loss in redis stream pubsub #4174

@fsedano

Description

@fsedano

Expected Behavior

When using a dapr pubsub component, I would expect it to:

  • Respect resiliency policies
  • Not having data loss in the event of a app pod restart

Actual Behavior

To be able to set policies etc, we need to set processingTimeout and redeliverInterval to zero. This works well, but causes message loss if our pod restarts, since it seems data is pulled from redis and stored in the sidecar.

So, either we set them to zero and face data loss if the pod restarts, or set them to non-zero and we have to implement policies in the app side, making dapr useless for us.

Steps to Reproduce the Problem

  • Create a redis streams pubsub, using k8s
  • Create a k8s deployment with a health check
  • Set processingTimeout=0 and redeliverInterval=0
  • Start publishing and consuming messages successfully
  • Simulate a failure: Return RETRY for some of the messages and after some time, make the app unhealthy. Make sure k8s health checks catches it and restart the pod.
  • When the pod comes online again, the messages app returned as RETRY won't be redelivered again, they are lost.

Release Note

RELEASE NOTE:

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions