Closed lfmatosm closed 2 months ago
Hi, thanks for the report.
I think the same situation in the case of dead lettering via rabbit itself. This failure modes are not atomic unfortunately. Please tell me more about your use case.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
Describe the bug Hello! First of all, thanks for your job creating eventing-rabbitmq.
I was creating a simple producer-consumer example in Knative using RabbitMQ. I am using a trigger to deliver messages from a broker into my consumer service, and I also configured a dead-letter sink service to handle failures. However, if both services are unresponsive (e.g. if routes are offline or if services were undeployed), messages are acklowledged by the DLQ dispatcher instead of being kept in the DLQ.
Expected behavior If the sink address is not reachable, messages should remain in the dead-letter queue.
To Reproduce You need to define a trigger with both subscriber and delivery services configured. This example should suffice:
Now, you must make those services unreachable. You can mess up with the routes, or in a more drastic way, undeploy them. Naturally, messages will be delivered to the trigger's DLQ, and the dispatcher will try to deliver them to its sink. However, upon erroring, the DLQ dispatcher will simply acknowledge the message and log the error.
You can see the DLQ dispatcher logs using
kubectl logs consumer-trigger-dlx-dispatcher-someidentifier -n spike
and something like this will be shown:Which abled me to trace down this behavior for this excerpt: https://github.com/knative-extensions/eventing-rabbitmq/blob/knative-v1.13.0/pkg/dispatcher/dispatcher.go#L287-L292
Knative release version Knative serving/eventing version: 1.12.0 Eventing RabbitMQ version: 1.13.0
Additional context If this a known behavior, maybe we could update documentation at least before addressing such problem.