apache / apache/rocketmq

[Enhancement] optimization transcation msg endTransaction in 5.x proxy

Open
#9,431 2 comments 1 reaction 0 assignees View on GitHub
type/enhancement
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
2d 20h
Merged PRs (30d)
26

Description

### Before Creating the Enhancement Request

- [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.

### Summary

endTransaction can use tranStateTableOffset and commitLogOffset in requestheader if 5.x proxy has no info(eg, proxy restart) which avoids endTransaction failure.

### Motivation

In 5.x version, if client send transcation msg but does not use the same proxy to commit, the msg will lost.
1. the client may commit half message in different proxy from send, such as client reconnect when proxy restart
2.The client uses the domain name to send transaction messages, but uses the IP under the domain name when submitting, resulting in different proxies when sending and submitting.
3. transaction info not only exists in the proxy that sent the message also in EndTransactionRequest header. If the proxy does not have this information, we can also use the request header
### Describe the Solution You'd Like

![Image](https://github.com/user-attachments/assets/59d0cf90-2d81-4f5b-bd5f-1bf0b0b57320)
in this endTransaction in proxy, we add two param commitLogOffset and tranStateTableOffset

### Describe Alternatives You've Considered

no

### Additional Context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.