1

I have an issue with dapr grpc events. Sometimes the events runs multiple times. I'm using redis and in another env. I'm using azure queues as I thought that the issue was related to redis but I have the same issue. I created a sample project that simulate what I'm doing. Here is the project https://github.com/AndrewSafwatFrancis/DaprTest and here is the settings in dapr pubsub.yml file

apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
  name: pubsub
spec:
  type: pubsub.redis
  version: v1
  metadata:
  - name: redisHost
    value: value
  - name: redisPassword
    value: value

If you can support, and tell me what is the issue or what's missing, it will be great as I'm stuck on it.

Andrew Safwat
  • 73
  • 1
  • 1
  • 6

1 Answers1

0

Dapr documentation for PubSub API

Dapr guarantees At-Least-Once semantics

Article about Microservice architecture

At-least once delivery guarantees that a message broker will deliver a message to a consumer even if errors occur. One side-effect, however, is that the consumer can be invoked repeatedly for the same message.

So, it is best to make your event handling consumer idempotent. If you receive the event once or twice the result should be the same.

Julio Cachay
  • 780
  • 5
  • 10