Skip to content

Commit

Permalink
Merge pull request #87 from imzs/main
Browse files Browse the repository at this point in the history
Add api definition of recalling message
  • Loading branch information
lollipopjin authored Nov 7, 2024
2 parents 37bcee2 + 935edb3 commit bab0523
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions StatusCode.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
| CONSUMER_GROUP_NOT_FOUND |||||||||||||||
| PAYLOAD_TOO_LARGE* | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 |
| MESSAGE_BODY_TOO_LARGE |||||||||||||||
| MESSAGE_BODY_EMPTY |||||||||||||||
| PRECONDITION_FAILED* | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 |
| TOO_MANY_REQUESTS* |||||||||||||||
| REQUEST_HEADER_FIELDS_TOO_LARGE* | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 |
Expand Down
19 changes: 19 additions & 0 deletions apache/rocketmq/v2/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ message SendResultEntry {
string message_id = 2;
string transaction_id = 3;
int64 offset = 4;
// Unique handle to identify message to recall, support delay message for now.
string recall_handle = 5;
}

message SendMessageResponse {
Expand Down Expand Up @@ -293,6 +295,17 @@ message QueryOffsetResponse {
int64 offset = 2;
}

message RecallMessageRequest {
Resource topic = 1;
// Refer to SendResultEntry.
string recall_handle = 2;
}

message RecallMessageResponse {
Status status = 1;
string message_id = 2;
}

// For all the RPCs in MessagingService, the following error handling policies
// apply:
//
Expand Down Expand Up @@ -416,4 +429,10 @@ service MessagingService {
// ChangeInvisibleDuration to lengthen invisible duration.
rpc ChangeInvisibleDuration(ChangeInvisibleDurationRequest) returns (ChangeInvisibleDurationResponse) {
}

// Recall a message,
// for delay message, should recall before delivery time, like the rollback operation of transaction message,
// for normal message, not supported for now.
rpc RecallMessage(RecallMessageRequest) returns (RecallMessageResponse) {
}
}

0 comments on commit bab0523

Please sign in to comment.