From 33f2311af3f30575cdb19b5d52221bf5e728c0e8 Mon Sep 17 00:00:00 2001 From: imjyz Date: Wed, 29 Apr 2026 12:03:12 +0800 Subject: [PATCH 1/3] Add client_properties field to Settings for client metadata (#107) --- apache/rocketmq/v2/definition.proto | 32 +++++++++++++++++++++++++++++ java/VERSION | 2 +- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/apache/rocketmq/v2/definition.proto b/apache/rocketmq/v2/definition.proto index 516474d..3778ccd 100644 --- a/apache/rocketmq/v2/definition.proto +++ b/apache/rocketmq/v2/definition.proto @@ -364,6 +364,13 @@ enum Code { ILLEGAL_OFFSET = 40019; // Format of lite topic is illegal. ILLEGAL_LITE_TOPIC = 40020; + // Client properties validation failed. This error occurs when: + // - The number of properties exceeds 32. + // - Key length exceeds 64 characters. + // - Key does not match the regex pattern: [a-zA-Z][a-zA-Z0-9_.-]* + // - Value length exceeds 256 characters. + // - Total serialized size exceeds 4KB. + INVALID_CLIENT_PROPERTIES = 40021; // Generic code indicates that the client request lacks valid authentication // credentials for the requested resource. @@ -523,6 +530,31 @@ message Settings { UA user_agent = 7; Metric metric = 8; + + // Application-defined metadata associated with this client instance. + // These properties are for observability, troubleshooting, auditing and + // management only. + // + // Constraints: + // - Maximum 32 key-value pairs per client instance + // - Key length: 1-64 characters, must match pattern [a-zA-Z][a-zA-Z0-9_.-]* + // - Value length: 0-256 characters + // - Total serialized size: <= 4KB + // + // Recommended keys: app, env, region, zone, version, instance, owner, deployment. + // Reserved prefix: "rocketmq." for system use. + // + // Server-side validation: + // - Reject with INVALID_CLIENT_PROPERTIES if constraints are violated + // - Treat values as untrusted client-declared metadata + // - Do NOT use for security decisions (authentication/authorization) + // + // Lifecycle: + // - Reported once during Telemetry stream establishment via TelemetryCommand.settings + // - Stored in server-side client runtime + // - Discarded when stream/channel is closed + // - Exposed via admin query APIs (e.g., producerConnection, consumerConnection) + map client_properties = 9; } message Publishing { diff --git a/java/VERSION b/java/VERSION index eca07e4..ccbccc3 100644 --- a/java/VERSION +++ b/java/VERSION @@ -1 +1 @@ -2.1.2 +2.2.0 From d55ce5a329dd406453956f5e78030974fc6ffac5 Mon Sep 17 00:00:00 2001 From: imjyz Date: Tue, 19 May 2026 17:22:53 +0800 Subject: [PATCH 2/3] perf: log of client_properties (#107) --- apache/rocketmq/v2/definition.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apache/rocketmq/v2/definition.proto b/apache/rocketmq/v2/definition.proto index 3778ccd..3e58615 100644 --- a/apache/rocketmq/v2/definition.proto +++ b/apache/rocketmq/v2/definition.proto @@ -541,7 +541,7 @@ message Settings { // - Value length: 0-256 characters // - Total serialized size: <= 4KB // - // Recommended keys: app, env, region, zone, version, instance, owner, deployment. + // Example keys used by some organizations: app, env, region, zone, version, instance, owner. // Reserved prefix: "rocketmq." for system use. // // Server-side validation: From 6c07466c59afb6dcea0c69fd8de457338beffc61 Mon Sep 17 00:00:00 2001 From: imjyz Date: Tue, 19 May 2026 21:30:10 +0800 Subject: [PATCH 3/3] perf: log of client_properties (#107) --- apache/rocketmq/v2/definition.proto | 1 - 1 file changed, 1 deletion(-) diff --git a/apache/rocketmq/v2/definition.proto b/apache/rocketmq/v2/definition.proto index 3e58615..060a2ff 100644 --- a/apache/rocketmq/v2/definition.proto +++ b/apache/rocketmq/v2/definition.proto @@ -541,7 +541,6 @@ message Settings { // - Value length: 0-256 characters // - Total serialized size: <= 4KB // - // Example keys used by some organizations: app, env, region, zone, version, instance, owner. // Reserved prefix: "rocketmq." for system use. // // Server-side validation: