Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions apache/rocketmq/v2/definition.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ enum MessageType {
// Messages that are transactional. Only committed messages are delivered to
// subscribers.
TRANSACTION = 4;

// lite topic
LITE = 5;
}

enum DigestType {
Expand Down Expand Up @@ -186,6 +189,7 @@ enum ClientType {
PUSH_CONSUMER = 2;
SIMPLE_CONSUMER = 3;
PULL_CONSUMER = 4;
LITE_PUSH_CONSUMER = 5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

协议里先把simple写进去。实现可以先不实现

}

enum Encoding {
Expand Down Expand Up @@ -270,6 +274,9 @@ message SystemProperties {

// Information to identify whether this message is from dead letter queue.
optional DeadLetterQueue dead_letter_queue = 20;

// lite topic
optional string lite_topic = 21;
}

message DeadLetterQueue {
Expand Down Expand Up @@ -348,6 +355,8 @@ enum Code {
ILLEGAL_POLLING_TIME = 40018;
// Offset is illegal.
ILLEGAL_OFFSET = 40019;
// Format of lite topic is illegal.
ILLEGAL_LITE_TOPIC = 40020;

// Generic code indicates that the client request lacks valid authentication
// credentials for the requested resource.
Expand Down Expand Up @@ -389,6 +398,10 @@ enum Code {
// Requests are throttled.
TOO_MANY_REQUESTS = 42900;

// LiteTopic related quota exceeded
LITE_TOPIC_QUOTA_EXCEEDED = 42901;
LITE_SUBSCRIPTION_QUOTA_EXCEEDED = 42902;

// Generic code for the case that the server is unwilling to process the request because its header fields are too large.
// The request may be resubmitted after reducing the size of the request header fields.
REQUEST_HEADER_FIELDS_TOO_LARGE = 43100;
Expand Down Expand Up @@ -548,6 +561,24 @@ message Subscription {
// Long-polling timeout for `ReceiveMessageRequest`, which is essential for
// push consumer.
optional google.protobuf.Duration long_polling_timeout = 5;

// Only lite push consumer
// client-side lite subscription quota limit
optional int32 lite_subscription_quota = 6;
// Only lite push consumer
// Maximum length limit for lite topic
optional int32 max_lite_topic_size = 7;
}

enum LiteSubscriptionAction {
// incremental add
INCREMENTAL_ADD = 0;
// incremental remove
INCREMENTAL_REMOVE = 1;
// all add
ALL_ADD = 3;
// add remove
ALL_REMOVE = 4;
}

message Metric {
Expand Down
28 changes: 28 additions & 0 deletions apache/rocketmq/v2/service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ message ReceiveMessageResponse {
message AckMessageEntry {
string message_id = 1;
string receipt_handle = 2;
optional string lite_topic = 3;
}

message AckMessageRequest {
Expand Down Expand Up @@ -148,6 +149,7 @@ message ForwardMessageToDeadLetterQueueRequest {
string message_id = 4;
int32 delivery_attempt = 5;
int32 max_delivery_attempts = 6;
optional string lite_topic = 7;
}

message ForwardMessageToDeadLetterQueueResponse { Status status = 1; }
Expand Down Expand Up @@ -193,6 +195,10 @@ message RecoverOrphanedTransactionCommand {
string transaction_id = 2;
}

message NotifyUnsubscribeLiteCommand {
string liteTopic = 1;
}

message TelemetryCommand {
optional Status status = 1;

Expand Down Expand Up @@ -221,6 +227,9 @@ message TelemetryCommand {

// Request client to reconnect server use the latest endpoints.
ReconnectEndpointsCommand reconnect_endpoints_command = 8;

// Request client to unsubscribe lite topic.
NotifyUnsubscribeLiteCommand notify_unsubscribe_lite_command = 9;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

注释

}
}

Expand Down Expand Up @@ -311,6 +320,21 @@ message RecallMessageResponse {
string message_id = 2;
}

message SyncLiteSubscriptionRequest {
LiteSubscriptionAction action = 1;
// bindTopic for lite push consumer
Resource topic = 2;
// consumer group
Resource group = 3;
// lite subscription set of lite topics
repeated string liteTopicSet = 4;
optional int64 version = 5;
}

message SyncLiteSubscriptionResponse {
Status status = 1;
}

// For all the RPCs in MessagingService, the following error handling policies
// apply:
//
Expand Down Expand Up @@ -440,4 +464,8 @@ service MessagingService {
// for normal message, not supported for now.
rpc RecallMessage(RecallMessageRequest) returns (RecallMessageResponse) {
}

// Sync lite subscription info, lite push consumer only
rpc SyncLiteSubscription(SyncLiteSubscriptionRequest) returns (SyncLiteSubscriptionResponse) {}

}
2 changes: 1 addition & 1 deletion java/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.5
2.1.0