Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用方案求助 #512

Open
bbz1024 opened this issue Jun 18, 2024 · 1 comment
Open

使用方案求助 #512

bbz1024 opened this issue Jun 18, 2024 · 1 comment

Comments

@bbz1024
Copy link

bbz1024 commented Jun 18, 2024

大佬们好,目前项目上遇到问题,其中使用到了dtm。具体项目流程是这样的:通过redis的lua脚本进行一个预扣减操作,lua执行完成返回一个计数器,计数器的值需要将消息和计数器值放入到消息队列,通过计数器的值进行确保消息执行的顺序,确保执行的是用户最后一次操作。使用dtm的目的是确保扣减成功,在消息队列生产消息时消息的可靠投入到交换机。但是就在这个阶段我需要确保消息投递可靠,虽然使用了发布确认机制和死信队列,也难免避免消息队列出现问题。使用过dtm的tcc和workflow都可以解决,但这两种都需要在客户端创建rpc服务。现在就在考虑是否saga可以解决,但是saga不能获取上一步返回的结果。我这个是个选课的系统。还请大佬给个提议

@yedf2
Copy link
Contributor

yedf2 commented Jul 20, 2024

使用过dtm的tcc和workflow都可以解决,但这两种都需要在客户端创建rpc服务。

TCC不需要的

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

No branches or pull requests

2 participants