在记录事件模式时使用哪些工具 [英] What tools to use on documenting event schema

查看:99
本文介绍了在记录事件模式时使用哪些工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的团队开始实施事件驱动的设计.现在,我们正在寻找记录这些事件模式的最佳工具和实践.

Our team is starting to implement event driven designs. We are now figuring what's the best tool/s and practices for documenting the schema of these events.

此用例使用哪些常用工具?

What are the common tools used for this use case?

感谢任何链接或建议.

推荐答案

我将从常见的 CloudEvents规范开始并基于此对我的事件进行建模,即将事件定义为通用CloudEvent模型的子类型.这样做的好处是可以与基于相同规范以及现有工具(例如语言SDKs .

I would start off with the common CloudEvents spec and model my events based on that, i.e., define the events as subtypes of the generic CloudEvent model. The benefit here is interoperability with other systems based on the same spec as well as the existing tooling such as language SDKs.

对于文档,我将使用JSONSchema:这是例如,通用CloudEvent的JSONSchema定义.

As for documentation, I'd go for JSONSchema: here's the JSONSchema definition for a generic CloudEvent for example.

作为替代方案,可以使用 AsyncAPI 规范,您可以代替或与CloudEvents一起使用:< a href ="https://www.asyncapi.com/blog/asyncapi-cloud-events/" rel ="nofollow noreferrer">在此处阅读.

As an alternative, there's the AsyncAPI specification which you can use instead of or together with CloudEvents: read here on how the two relate.

这篇关于在记录事件模式时使用哪些工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆