1

As a follow-up to Axon Event Published Multiple Times Over Eventbus, when using an EmbeddedEventStore and publishing a command that will attempt to create an instance of an aggregate that already exists, Axon is not throwing an exception indicating the instance exists (or constraint violation), as is on the contrary, when using Axon's JPA event store. Is this the expected behavior? If so, why?

blackcompe
  • 3,180
  • 16
  • 27
  • Did Lucas' answer point you in the right direction @blackcompe? If not, maybe there's something to be added to your question so that others can provide a conclusive answer? – Steven Jan 15 '21 at 16:19

1 Answers1

1

Recently our community filed a similar issue to our repo that I am going refer here.

Essentially the JPA or JDBC implementation are responsible for catching this kind of exceptions and translating them to something the Framework understands.

If that occurs, you should see an AggregateStreamCreationException dispatched, indicating that it failed and why it failed. If this is not happening I recommend you looking into your PersistenceExceptionResolver.

If you still see this happening after checking what I shared, this is likely a bug and in this case, feel free to open it on our repo as such.

Lucas Campos
  • 1,860
  • 11
  • 17