Skip to content

Conversation

@viktorgt
Copy link
Member

No description provided.

become challenging to enforce across multiple systems.

One of the core issues is the uncertainty of atomicity.
For instance, consider a scenario where a transaction involves writing an event to a RabbitMQ and also updating a record in a database.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: use a more concrete (simplified) example, for example:

instead of "writing event and updating record", an extremely concrete alternative would be to say "tell George you ate his meal after eating his last burrito". or maybe instead "post an image on Instagram", which probably involves data record and event writes.

this helps the reader later on in the text when you refer to this hypothetical situation, because they can remember it better than generic words such as "event" and "record". (I had to go back to this example because it happened to me)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it challenging to draw a direct real-world analogy that accurately captures the technical nuances of this specific scenario. We can discuss this face-2-face.


1. **Starting the Application:** Use Docker to start the PostgreSQL and RabbitMQ services `docker-comose up`,
and then run the Spring Boot application.
2. **Creating Users:** To test user creation and the subsequent event publishing, you can use the `/users` endpoint.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please mention the beginning of this section what the app does: apparently it inserts users? this texts feels like it was explained earlier and that I forgot it

To simulate errors in event sending, utilize the `/failing-events` endpoint.
This endpoint generates a `FailingEvent` and attempts to send it to RabbitMQ.
The `RabbitMqSender` is programmed to mimic an error by intentionally failing once for each instance of `FailingEvent`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could make this ending smoother by adding another sentence such as: "Play around and have fun exploring the outbox pattern!"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a little challenge for the reader? if they downloaded the repo, what else could they try to add on their own? without explaining the solution. "tell us in the comments how you solved this challenge"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the old image. I also updated this a bit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still the old image. I also updated this a bit.


## Running Application

1. **Starting the Application:** Use Docker to start the PostgreSQL and RabbitMQ services `docker-comose up`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the installation of docker should be added somewhere as a prerequisite

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not go that deep, since if you're not having docker running, you will have also issues to understand a lot of the ramp up stuff.

@viktorgt viktorgt merged commit b9a106a into main Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants