You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
- Something like you describe is already done for you by ACID databases.Kevin Krumwiede– Kevin Krumwiede2016-12-18 21:16:00 +00:00Commented Dec 18, 2016 at 21:16
- 1How can ACID databases help here? What does the transaction commit? There is no way to rollback sending the email if the dB transaction is not committed.Nick Williams– Nick Williams2016-12-18 21:38:11 +00:00Commented Dec 18, 2016 at 21:38
- It will allow you to detect the failure to persist the event ID and avoid sending multiple emails.Kevin Krumwiede– Kevin Krumwiede2016-12-18 22:17:05 +00:00Commented Dec 18, 2016 at 22:17
- Sorry Kevin I am not following, how does it do that? You could begin a transaction, persist the id (insert/update a table), send the email, attempt to commit the transaction but the commit fails. For instance if the application server lost connection the database server. Given persisting the last handled id is a single statement it is already atomic, consistant and durable. The message bus would deliver events serially so the action is isolated. I think I might be misunderstanding your solution?Nick Williams– Nick Williams2016-12-18 22:27:38 +00:00Commented Dec 18, 2016 at 22:27
- I get that I can determine that the transaction failed. But if the event was redelivered, the event handler would not know that this event already created an email. bit.ly/1xiuGAbNick Williams– Nick Williams2016-12-18 22:33:30 +00:00Commented Dec 18, 2016 at 22:33
| Show 2 more comments
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you