liangyepianzhou commented on PR #21114: URL: https://github.com/apache/pulsar/pull/21114#issuecomment-1733207675
Leave an example to illustrate the usage scenario. **Operations**: Large volume of deposit and withdrawal operations, a small number of transfer operations. **Roles**: - **Client A1** - **Client A2** - **User Account B1** - **User Account B2** - **Request Topic C** - **Real-time Monitoring System D** - **Business Processing System E** **Client Operations**: - **Withdrawal**: Client A1 decreases the deposit amount from User Account B1 or B2. - **Deposit**: Client A1 increases the deposit amount in User Account B1 or B2. - **Transfer**: Client A2 decreases the deposit amount from User Account B1 and increases it in User Account B2. Or vice versa. **Real-time Monitoring System D**: Obtains the latest data from Request Topic C as quickly as possible to monitor transaction data and changes in bank reserves in real-time. This is necessary for the timely detection of anomalies and real-time decision-making. **Business Processing System E**: Reads data from Request Topic C, then actually operates User Accounts B1, B2. **User Scenario**: Client A1 sends a large number of deposit and withdrawal requests to Request Topic C. Client A2 writes a small number of transfer requests to Request Topic C. In this case, Business Processing System E needs a read-committed isolation level to ensure operation consistency and Exactly Once semantics. The real-time monitoring system does not care if a small number of transfer requests are incomplete (dirty data). What it cannot tolerate is a situation where a large number of deposit and withdrawal requests cannot be presented in real time due to a small number of transfer requests (the current situation is that uncommitted transaction messages can block the reading of committed transaction messages). In this case, it is necessary to set different isolation levels for different consumers/subscriptions. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
