Closed dengyangxi closed 1 year ago
Hello,
Thank you for your feedback. In our system design, a message is operated on twice at the publisher side. On the consumer side, the number of operations depends on whether your subscribers are in multiple consumer groups. The minimum is also twice. If your publisher and consumer sides use the same database or are located within the same service, then there are four operations for the database. For the message, the same message is still operated on twice. This is our design, ensuring the reliability of the message.
The point you need to clarify is how your deadlock occurred, as it's unrelated to the number of database operations.
Based on your illustrative diagram, it appears that business SQL operations and event messages cannot be guaranteed to remain within the same transaction.
Thanks
When there is a large amount of messages, due to the existing mechanism, one message requires 4 DB operations, resulting in a deadlock。
Is it feasible to use the local message repository SQLite/LiteDB ?
for example: