From 1845bd461391871f44ff0ff7b8021805596fcdff Mon Sep 17 00:00:00 2001 From: imzs Date: Thu, 7 Nov 2024 15:20:40 +0800 Subject: [PATCH 1/2] add api definition of recalling message --- apache/rocketmq/v2/service.proto | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/apache/rocketmq/v2/service.proto b/apache/rocketmq/v2/service.proto index 513a103..1a3dbbe 100644 --- a/apache/rocketmq/v2/service.proto +++ b/apache/rocketmq/v2/service.proto @@ -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 { @@ -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: // @@ -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) { + } } \ No newline at end of file From 935edb3ab88e7f433f8f1672e933ed7496639e98 Mon Sep 17 00:00:00 2001 From: imzs Date: Thu, 7 Nov 2024 15:28:28 +0800 Subject: [PATCH 2/2] update status code document for code: MESSAGE_BODY_EMPTY --- StatusCode.md | 1 + 1 file changed, 1 insertion(+) diff --git a/StatusCode.md b/StatusCode.md index 31eedcd..e636fce 100644 --- a/StatusCode.md +++ b/StatusCode.md @@ -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* | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 | 🔄 |