I have the logic of message processing is not idempotent. So before executing it I have each incoming message to check for duplicates through a special database table that long.
In the case of RabbitMQ, example, if a message is delivered to a consumer and then requeued then RabbitMQ will set the "redelivered" flag on it when it is delivered again. https://www.rabbitmq.com/reliability.html#consumer
Is there a way to know what rebus sent the message again after a failed attempt or need to check every message on duplicate?
If this is not possible, as usually quickly and reliably deduplicate messages, without using a database?