Shazin Sadakath
1 min readJul 21, 2022

--

It will not make any difference. But since HSQLDB is an embedded database not something running in network I opted use MySQL. You can use HSQLDB in network mode if you want given Debezium has a connector for HSQLDB.

This was his response:

IMHO, your example suffers from some misconceptions, or at least doesn't actually apply CQRS nor Event-Sourcing patterns.1. It doesn't use E/S because it doesn't save events that occured on an entity, but it saves commands only. Commands should not be confused with events, they are only intents to do something that might fail (ex: a command to delete a non existing user will not generate any event on any entity).2. It's not really CQRS, because your command-handling component does not actually handle commands : it does not make any check, doesn't verify existence of a user to accept a delete command, it just delegates everything to the query-handling component (by sending message though kafka). So the command-handling component is not actually handling it's own model and / or data. And it is also not even able to return an error to the client : as it doesnt not have any kind of persistence of the entities (state or events if you do E/S), it cannot make any check, and cannot return anything else that "everything is fine".

--

--

Shazin Sadakath
Shazin Sadakath

No responses yet