EventStore Commit Guid,它的真正用途是什么?

编程入门 行业动态 更新时间:2024-10-25 18:28:32
本文介绍了EventStore Commit Guid,它的真正用途是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我知道Jonathan Oliver的事件存储在内部使用了CommitId. 到目前为止,我一直为CommitId提供一个Guid.NewGuid().

I understand the CommitId is used internally by Jonathan Oliver's event store. So far I've always provided a Guid.NewGuid() for the CommitId.

你们每个人什么时候想做些不同的事情?

When would you every want to do anything different?

我不明白为什么它在他的公共域存储库中公开.

I don't understand why it is exposed within his common domain Repository.

任何人都可以对此有所了解吗?

Can anyone can shed some light on this?

推荐答案

通常,CommonDomain不会尝试强制采用一种千篇一律的自以为是的结构.

In general, CommonDomain doesn't try to force a one-size-fits-all opinionated structure.

一种利用它的方法是让编写者使用其唯一的传入命令ID作为CommitId,这意味着竞争(或重试与尚未超时的运行进行竞争)将被拒绝,而无需输入特定的异常进入/考虑/管理冲突解决逻辑.这是用来实现幂等命令的关键原则.

One way to leverage it is by having writers use their unique incoming Command Id as a CommitId - this means that competing (or retries competing with runs that have yet to time out) will get rejected with a specific exception without needing to enter into/consider/manage Conflict Resolution logic. This is used to fulfil the key tenet of Idempotent Commands.

更多推荐

EventStore Commit Guid,它的真正用途是什么?

本文发布于:2023-10-29 13:04:03,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1539768.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:用途   EventStore   Commit   Guid

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!