dapr / dotnet-sdk

Dapr SDK for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add option to handle 'dead letters' by sending them to a dead letter queue rather than a dead leter topic

WillPilgrim opened this issue · comments

I had some trouble getting the behaviour I wanted from the pubsub component regarding handling 'dead letters'. I'm using RabbitMQ as the pubsub tech. I expected when I forced a drop from the consumer (by sending '"status": "drop"' in the reply) that it would immediately send the message to a RabbitMQ dead letter queue. Instead I found I could configure it to post the message to another topic. In my case I called it deadlettertopic and I sent all message types that were programmatically dropped (or exceeded their retry policy) to that topic. Within the topic consumer I sent these messages (including the cloud events data by NOT using .UseCloudEvents) to a specific queue in RabbitMQ via dapr bindings.
It would be much nicer if I could configure either the pubsub component or the consumer to send all dead letters to a nominated queue directly. I realise that different implementations of the pubsub component have different capabilities but some 'do this if supported' capability would be nice.

@WillPilgrim This would be a good issue for the dapr/components-contrib repo as it'd likely need to be something that was done per-pub-sub component.

No worries. I've moved it to dapr/components-contrib