conduit icon indicating copy to clipboard operation
conduit copied to clipboard

Uniqueness middleware issue after event removed

Open Yamilquery opened this issue 4 years ago • 0 comments

Support.Middleware.Uniqueness module works fine if the only thing that you need to validate is if the command hasn't been dispatched before with a common field name.

But what happens if you dispatch a command to remove something and later you try to create it again with the same value in the unique field? You would get an error, even if the record doesn't exist anymore.

To avoid that it would be great to add a timestamp comparing the dispatched commands in order to avoid comparing commands in long periods of time. At the end of the day, we just need this uniqueness feature to avoid duplicated event creation.

I'm going to try to make the changes and submit a pull request.

Yamilquery avatar Oct 01 '19 16:10 Yamilquery