Comments (4)
Can you describe simply the solution you are working with to improve idempotence?
from cap.
@standardcore
In version 2.0, I have wapped the message content with Message
class, Message
object provider a Id
property used to be guarantee message sequence, in consumer method we can check the Id
whether it has been processed or not.
from cap.
This feature will be given to the user to ensure.
from cap.
CAP does not implement idempotent for several reasons: The following are the receiving end
-
- The message was successfully written, but the execution of the Consumer method failed.
There are many reasons why the Consumer method fails. I don't know if the specific scene is blindly retrying or not retrying is an incorrect choice.
For example: If the consumer is the debit service, if the execution of the deduction is successful, but the failure to write the debit log, the CAP will judge the consumer execution failure, and try again. If the client does not guarantee idempotency, the framework will retry it, which will inevitably lead to serious consequences for multiple deductions.
-
- the implementation of the Consumer method succeeded, but received the same message
The scenario here is also possible. If the Consumer has been successfully executed at the beginning, but for some reason, such as the Broker recovery, and received the same message, the CAP will consider this a new after receiving the Broker message. The message will be executed again by the Consumer. Because it is a new message, the CAP cannot be idempotent at this time.
-
- the current data storage mode can not be idempotent
Since the table of the CAP message is deleted after 1 hour for the successfully consumed message, if the historical message cannot be idempotent. Historically, it means that if the broker has maintained or manually processed some messages for some reason.
-
- Industry practices
Many event-driven frameworks require users to ensure idempotent operations, such as ENode, RocketMQ, etc...
From an implementation point of view, CAP can do some less stringent idempotence, but strict idempotent cannot.
from cap.
Related Issues (20)
- How to implement transaction Pub/Sub using CAP & FreeSql using demo? HOT 2
- CAP has not been started! HOT 4
- Question about parallel execution HOT 6
- Error in Nats transport HOT 4
- 能不能加个配置,可以单独启用消费功能或发送功能 ? HOT 2
- How to Introduce Multiple Database Providers? HOT 1
- .NET Core 8 使用RabbitMQ 报No ip address could be resolved for【hostName】的问题 HOT 1
- Optimizing RabbitMQ Performance and Managing Multiple Instances in CAP HOT 2
- Feature Request: Per-Queue Configuration for BasicQos and ConsumerThreadCount HOT 3
- 消息持久化支持达梦数据库吗 HOT 1
- Is the message data structure compatible with older versions of 3.0? HOT 1
- Add new option for parallel publish send. HOT 2
- Add option for controlling reponse headers from OnSubscribeExecuted HOT 2
- NATS Connection Error after Restarting nats-server: Unable to Publish Messages HOT 5
- SQL Server replication readpast error! "You can only specify the READPAST lock in the READ COMMITTED or REPEATABLE READ isolation levels" HOT 3
- 一个进程内可以创建多个CAP吗? HOT 1
- NATS feature: add the possibility to disable dynamic consumer subject/topic creation through NatsCapOtpions HOT 2
- 一个程序进程会操作多个不同的业务数据库,参考#998创建多个发布者进行对应处理,消费者应该如何处理消息? HOT 1
- Feature Request: Add New Column in table Cap.published for relation to table every single data publish HOT 2
- Callback on IIS Idle state HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cap.