What happens if we lose some event(s) during transaction?

Neşeli Günler — https://youtu.be/l03DCLQH0RY

If you are going to leave a message to another service, don’t leave it directly to the message broker, write it in a table and read it from there.

The advantage of this is that we will never lose events anymore, and we will be able to launch them again if needed. As for the disadvantage, writing / reading events will be an extra cost for us. Of course, applying and using this pattern should be according to your needs.

So how do we implement it?

First, I start by creating the project structure. I preferred to proceed using onion architecture. Because Onion Architecutre, which is very convenient for DDD, it will provide you to separate the layers more accurately and responsibilities more. For more information on Onion Architecture, look at here.

Understanding Onion Architecture
After creating a user



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Furkan Bozdag

Furkan Bozdag

I don’t know what’s happening here? | sr. software engineer