Hi all,
Jaroslav, you are expecting to be able to reuse the aggregate identifier 03013712 because you did a “domain specific” delete of the aggregate.
However, as you are doing event sourcing, this is only a conceptual delete, but the fact it existed still remains.
Hence, the uniqueness constraint kicks in as soon as you try to create an aggregate with the same identifier.
We typically suggest to use a UUID as the aggregate identifier.
You are obviously free to use other formats than a UUID, but know that once used, you cannot delete the fact.
Hope this sheds some light on the situation.
Cheers,
Steven van Beelen
Axon Framework Lead Developer