Hi, need some advice.
I have a billing app that handles payment commands. Whenever I receive multiple commands for the same aggregate, it fails to persist data to the database because both threads freeze. I posted a sample of code to here https://github.com/ryessekeyev/billing-sandbox. There is /api/payments-test endpoint which simulates the issue. I think the issue is the incorrect way of handling payment because I send other commands in the callback method on success. Need advice on how to fix it.
I attached a log file that shows the process.
billing-sanbox.log (38.3 KB)