tesonep / pharo-testWorkers

4 stars 4 forks source link

Test Worker should not reperform the test on message redelivery #7

Closed VincentBlondeau closed 9 months ago

VincentBlondeau commented 3 years ago

From: https://www.rabbitmq.com/reliability.html,

"In the event of network failure (or a node failure), messages can be redelivered, and consumers must be prepared to handle deliveries they have seen in the past. It is recommended that consumer implementation is designed to be idempotent rather than to explicitly perform deduplication.

If a message is delivered to a consumer and then requeued, either automatically by RabbitMQ or by the same or different consumer, RabbitMQ will set the redelivered flag on it when it is delivered again. This is a hint that a consumer may have seen this message before. This is not guaranteed as the original delivery might have not made it to any consumers due to a network or consumer application failure.

If the redelivered flag is not set then it is guaranteed that the message has not been seen before. Therefore if a consumer finds it more expensive to deduplicate messages or process them in an idempotent manner, it can do this only for messages with the redelivered flag set."

As some tests may be slow to run, we need to catch the result and resent it on those kind of requests

tesonep commented 3 years ago

@VincentBlondeau I have done some work on the stability of the workers, can you check it. Thanks

VincentBlondeau commented 9 months ago

No more issues since then. Closing.