This is an automated email from the ASF dual-hosted git repository. aaronai pushed a commit to branch java in repository https://gitbox.apache.org/repos/asf/rocketmq-apis.git
commit 2e44f1ef41dc7ef2f432d7d323d02663fcc5d65d Author: 凌楚 <[email protected]> AuthorDate: Wed Apr 27 15:50:15 2022 +0800 Apply IDL update --- src/main/java/apache/rocketmq/v2/MQService.java | 46 +- src/main/java/apache/rocketmq/v2/Publishing.java | 280 +---------- .../apache/rocketmq/v2/PublishingOrBuilder.java | 34 +- src/main/java/apache/rocketmq/v2/Settings.java | 536 ++++++++++++++++----- .../java/apache/rocketmq/v2/SettingsOrBuilder.java | 72 ++- src/main/java/apache/rocketmq/v2/Subscription.java | 377 ++------------- .../apache/rocketmq/v2/SubscriptionOrBuilder.java | 49 +- .../proto/apache/rocketmq/v2/service.proto | 42 +- 8 files changed, 599 insertions(+), 837 deletions(-) diff --git a/src/main/java/apache/rocketmq/v2/MQService.java b/src/main/java/apache/rocketmq/v2/MQService.java index 4796afe..1a2c012 100644 --- a/src/main/java/apache/rocketmq/v2/MQService.java +++ b/src/main/java/apache/rocketmq/v2/MQService.java @@ -267,28 +267,26 @@ public final class MQService { "he.rocketmq.v2.Status\"\200\001\n!RecoverOrphane" + "dTransactionCommand\022C\n\036orphaned_transact" + "ional_message\030\001 \001(\0132\033.apache.rocketmq.v2" + - ".Message\022\026\n\016transaction_id\030\002 \001(\t\"\251\001\n\nPub" + - "lishing\022,\n\006topics\030\001 \003(\0132\034.apache.rocketm" + - "q.v2.Resource\0225\n\014retry_policy\030\002 \001(\0132\037.ap" + - "ache.rocketmq.v2.RetryPolicy\022\037\n\027compress" + - "_body_threshold\030\003 \001(\005\022\025\n\rmax_body_size\030\004" + - " \001(\005\"\204\003\n\014Subscription\0220\n\005group\030\001 \001(\0132\034.a" + - "pache.rocketmq.v2.ResourceH\000\210\001\001\022<\n\rsubsc" + - "riptions\030\002 \003(\0132%.apache.rocketmq.v2.Subs" + - "criptionEntry\022\021\n\004fifo\030\003 \001(\010H\001\210\001\001\022<\n\016back" + - "off_policy\030\004 \001(\0132\037.apache.rocketmq.v2.Re" + - "tryPolicyH\002\210\001\001\022\037\n\022receive_batch_size\030\005 \001" + - "(\005H\003\210\001\001\022<\n\024long_polling_timeout\030\006 \001(\0132\031." + - "google.protobuf.DurationH\004\210\001\001B\010\n\006_groupB" + - "\007\n\005_fifoB\021\n\017_backoff_policyB\025\n\023_receive_" + - "batch_sizeB\027\n\025_long_polling_timeout\"\347\002\n\010" + - "Settings\0228\n\013client_type\030\001 \001(\0162\036.apache.r" + - "ocketmq.v2.ClientTypeH\001\210\001\001\0228\n\014access_poi" + - "nt\030\002 \001(\0132\035.apache.rocketmq.v2.EndpointsH" + - "\002\210\001\001\0227\n\017request_timeout\030\003 \001(\0132\031.google.p" + - "rotobuf.DurationH\003\210\001\001\0224\n\npublishing\030\004 \001(" + + ".Message\022\026\n\016transaction_id\030\002 \001(\t\"r\n\nPubl" + + "ishing\022,\n\006topics\030\001 \003(\0132\034.apache.rocketmq" + + ".v2.Resource\022\037\n\027compress_body_threshold\030" + + "\002 \001(\005\022\025\n\rmax_body_size\030\003 \001(\005\"\263\002\n\014Subscri" + + "ption\0220\n\005group\030\001 \001(\0132\034.apache.rocketmq.v" + + "2.ResourceH\000\210\001\001\022<\n\rsubscriptions\030\002 \003(\0132%" + + ".apache.rocketmq.v2.SubscriptionEntry\022\021\n" + + "\004fifo\030\003 \001(\010H\001\210\001\001\022\037\n\022receive_batch_size\030\004" + + " \001(\005H\002\210\001\001\022<\n\024long_polling_timeout\030\005 \001(\0132" + + "\031.google.protobuf.DurationH\003\210\001\001B\010\n\006_grou" + + "pB\007\n\005_fifoB\025\n\023_receive_batch_sizeB\027\n\025_lo" + + "ng_polling_timeout\"\240\003\n\010Settings\0228\n\013clien" + + "t_type\030\001 \001(\0162\036.apache.rocketmq.v2.Client" + + "TypeH\001\210\001\001\0228\n\014access_point\030\002 \001(\0132\035.apache" + + ".rocketmq.v2.EndpointsH\002\210\001\001\0227\n\016backoff_p" + + "olicy\030\003 \001(\0132\037.apache.rocketmq.v2.RetryPo" + + "licy\0227\n\017request_timeout\030\004 \001(\0132\031.google.p" + + "rotobuf.DurationH\003\210\001\001\0224\n\npublishing\030\005 \001(" + "\0132\036.apache.rocketmq.v2.PublishingH\000\0228\n\014s" + - "ubscription\030\005 \001(\0132 .apache.rocketmq.v2.S" + + "ubscription\030\006 \001(\0132 .apache.rocketmq.v2.S" + "ubscriptionH\000B\t\n\007pub_subB\016\n\014_client_type" + "B\017\n\r_access_pointB\022\n\020_request_timeout\"\356\003" + "\n\020TelemetryCommand\0220\n\010settings\030\001 \001(\0132\034.a" + @@ -514,19 +512,19 @@ public final class MQService { internal_static_apache_rocketmq_v2_Publishing_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_apache_rocketmq_v2_Publishing_descriptor, - new java.lang.String[] { "Topics", "RetryPolicy", "CompressBodyThreshold", "MaxBodySize", }); + new java.lang.String[] { "Topics", "CompressBodyThreshold", "MaxBodySize", }); internal_static_apache_rocketmq_v2_Subscription_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_apache_rocketmq_v2_Subscription_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_apache_rocketmq_v2_Subscription_descriptor, - new java.lang.String[] { "Group", "Subscriptions", "Fifo", "BackoffPolicy", "ReceiveBatchSize", "LongPollingTimeout", "Group", "Fifo", "BackoffPolicy", "ReceiveBatchSize", "LongPollingTimeout", }); + new java.lang.String[] { "Group", "Subscriptions", "Fifo", "ReceiveBatchSize", "LongPollingTimeout", "Group", "Fifo", "ReceiveBatchSize", "LongPollingTimeout", }); internal_static_apache_rocketmq_v2_Settings_descriptor = getDescriptor().getMessageTypes().get(27); internal_static_apache_rocketmq_v2_Settings_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_apache_rocketmq_v2_Settings_descriptor, - new java.lang.String[] { "ClientType", "AccessPoint", "RequestTimeout", "Publishing", "Subscription", "PubSub", "ClientType", "AccessPoint", "RequestTimeout", }); + new java.lang.String[] { "ClientType", "AccessPoint", "BackoffPolicy", "RequestTimeout", "Publishing", "Subscription", "PubSub", "ClientType", "AccessPoint", "RequestTimeout", }); internal_static_apache_rocketmq_v2_TelemetryCommand_descriptor = getDescriptor().getMessageTypes().get(28); internal_static_apache_rocketmq_v2_TelemetryCommand_fieldAccessorTable = new diff --git a/src/main/java/apache/rocketmq/v2/Publishing.java b/src/main/java/apache/rocketmq/v2/Publishing.java index d6ac3b4..e34ad62 100644 --- a/src/main/java/apache/rocketmq/v2/Publishing.java +++ b/src/main/java/apache/rocketmq/v2/Publishing.java @@ -59,25 +59,12 @@ private static final long serialVersionUID = 0L; input.readMessage(apache.rocketmq.v2.Resource.parser(), extensionRegistry)); break; } - case 18: { - apache.rocketmq.v2.RetryPolicy.Builder subBuilder = null; - if (retryPolicy_ != null) { - subBuilder = retryPolicy_.toBuilder(); - } - retryPolicy_ = input.readMessage(apache.rocketmq.v2.RetryPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retryPolicy_); - retryPolicy_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { + case 16: { compressBodyThreshold_ = input.readInt32(); break; } - case 32: { + case 24: { maxBodySize_ = input.readInt32(); break; @@ -187,48 +174,7 @@ private static final long serialVersionUID = 0L; return topics_.get(index); } - public static final int RETRY_POLICY_FIELD_NUMBER = 2; - private apache.rocketmq.v2.RetryPolicy retryPolicy_; - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return Whether the retryPolicy field is set. - */ - @java.lang.Override - public boolean hasRetryPolicy() { - return retryPolicy_ != null; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return The retryPolicy. - */ - @java.lang.Override - public apache.rocketmq.v2.RetryPolicy getRetryPolicy() { - return retryPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : retryPolicy_; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - @java.lang.Override - public apache.rocketmq.v2.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { - return getRetryPolicy(); - } - - public static final int COMPRESS_BODY_THRESHOLD_FIELD_NUMBER = 3; + public static final int COMPRESS_BODY_THRESHOLD_FIELD_NUMBER = 2; private int compressBodyThreshold_; /** * <pre> @@ -238,7 +184,7 @@ private static final long serialVersionUID = 0L; * threshold. * </pre> * - * <code>int32 compress_body_threshold = 3;</code> + * <code>int32 compress_body_threshold = 2;</code> * @return The compressBodyThreshold. */ @java.lang.Override @@ -246,7 +192,7 @@ private static final long serialVersionUID = 0L; return compressBodyThreshold_; } - public static final int MAX_BODY_SIZE_FIELD_NUMBER = 4; + public static final int MAX_BODY_SIZE_FIELD_NUMBER = 3; private int maxBodySize_; /** * <pre> @@ -255,7 +201,7 @@ private static final long serialVersionUID = 0L; * client-side check validation. * </pre> * - * <code>int32 max_body_size = 4;</code> + * <code>int32 max_body_size = 3;</code> * @return The maxBodySize. */ @java.lang.Override @@ -280,14 +226,11 @@ private static final long serialVersionUID = 0L; for (int i = 0; i < topics_.size(); i++) { output.writeMessage(1, topics_.get(i)); } - if (retryPolicy_ != null) { - output.writeMessage(2, getRetryPolicy()); - } if (compressBodyThreshold_ != 0) { - output.writeInt32(3, compressBodyThreshold_); + output.writeInt32(2, compressBodyThreshold_); } if (maxBodySize_ != 0) { - output.writeInt32(4, maxBodySize_); + output.writeInt32(3, maxBodySize_); } unknownFields.writeTo(output); } @@ -302,17 +245,13 @@ private static final long serialVersionUID = 0L; size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, topics_.get(i)); } - if (retryPolicy_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getRetryPolicy()); - } if (compressBodyThreshold_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, compressBodyThreshold_); + .computeInt32Size(2, compressBodyThreshold_); } if (maxBodySize_ != 0) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, maxBodySize_); + .computeInt32Size(3, maxBodySize_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -331,11 +270,6 @@ private static final long serialVersionUID = 0L; if (!getTopicsList() .equals(other.getTopicsList())) return false; - if (hasRetryPolicy() != other.hasRetryPolicy()) return false; - if (hasRetryPolicy()) { - if (!getRetryPolicy() - .equals(other.getRetryPolicy())) return false; - } if (getCompressBodyThreshold() != other.getCompressBodyThreshold()) return false; if (getMaxBodySize() @@ -355,10 +289,6 @@ private static final long serialVersionUID = 0L; hash = (37 * hash) + TOPICS_FIELD_NUMBER; hash = (53 * hash) + getTopicsList().hashCode(); } - if (hasRetryPolicy()) { - hash = (37 * hash) + RETRY_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getRetryPolicy().hashCode(); - } hash = (37 * hash) + COMPRESS_BODY_THRESHOLD_FIELD_NUMBER; hash = (53 * hash) + getCompressBodyThreshold(); hash = (37 * hash) + MAX_BODY_SIZE_FIELD_NUMBER; @@ -503,12 +433,6 @@ private static final long serialVersionUID = 0L; } else { topicsBuilder_.clear(); } - if (retryPolicyBuilder_ == null) { - retryPolicy_ = null; - } else { - retryPolicy_ = null; - retryPolicyBuilder_ = null; - } compressBodyThreshold_ = 0; maxBodySize_ = 0; @@ -549,11 +473,6 @@ private static final long serialVersionUID = 0L; } else { result.topics_ = topicsBuilder_.build(); } - if (retryPolicyBuilder_ == null) { - result.retryPolicy_ = retryPolicy_; - } else { - result.retryPolicy_ = retryPolicyBuilder_.build(); - } result.compressBodyThreshold_ = compressBodyThreshold_; result.maxBodySize_ = maxBodySize_; onBuilt(); @@ -630,9 +549,6 @@ private static final long serialVersionUID = 0L; } } } - if (other.hasRetryPolicy()) { - mergeRetryPolicy(other.getRetryPolicy()); - } if (other.getCompressBodyThreshold() != 0) { setCompressBodyThreshold(other.getCompressBodyThreshold()); } @@ -1017,170 +933,6 @@ private static final long serialVersionUID = 0L; return topicsBuilder_; } - private apache.rocketmq.v2.RetryPolicy retryPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> retryPolicyBuilder_; - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return Whether the retryPolicy field is set. - */ - public boolean hasRetryPolicy() { - return retryPolicyBuilder_ != null || retryPolicy_ != null; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return The retryPolicy. - */ - public apache.rocketmq.v2.RetryPolicy getRetryPolicy() { - if (retryPolicyBuilder_ == null) { - return retryPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : retryPolicy_; - } else { - return retryPolicyBuilder_.getMessage(); - } - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public Builder setRetryPolicy(apache.rocketmq.v2.RetryPolicy value) { - if (retryPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - retryPolicy_ = value; - onChanged(); - } else { - retryPolicyBuilder_.setMessage(value); - } - - return this; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public Builder setRetryPolicy( - apache.rocketmq.v2.RetryPolicy.Builder builderForValue) { - if (retryPolicyBuilder_ == null) { - retryPolicy_ = builderForValue.build(); - onChanged(); - } else { - retryPolicyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public Builder mergeRetryPolicy(apache.rocketmq.v2.RetryPolicy value) { - if (retryPolicyBuilder_ == null) { - if (retryPolicy_ != null) { - retryPolicy_ = - apache.rocketmq.v2.RetryPolicy.newBuilder(retryPolicy_).mergeFrom(value).buildPartial(); - } else { - retryPolicy_ = value; - } - onChanged(); - } else { - retryPolicyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public Builder clearRetryPolicy() { - if (retryPolicyBuilder_ == null) { - retryPolicy_ = null; - onChanged(); - } else { - retryPolicy_ = null; - retryPolicyBuilder_ = null; - } - - return this; - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public apache.rocketmq.v2.RetryPolicy.Builder getRetryPolicyBuilder() { - - onChanged(); - return getRetryPolicyFieldBuilder().getBuilder(); - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - public apache.rocketmq.v2.RetryPolicyOrBuilder getRetryPolicyOrBuilder() { - if (retryPolicyBuilder_ != null) { - return retryPolicyBuilder_.getMessageOrBuilder(); - } else { - return retryPolicy_ == null ? - apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : retryPolicy_; - } - } - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> - getRetryPolicyFieldBuilder() { - if (retryPolicyBuilder_ == null) { - retryPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder>( - getRetryPolicy(), - getParentForChildren(), - isClean()); - retryPolicy_ = null; - } - return retryPolicyBuilder_; - } - private int compressBodyThreshold_ ; /** * <pre> @@ -1190,7 +942,7 @@ private static final long serialVersionUID = 0L; * threshold. * </pre> * - * <code>int32 compress_body_threshold = 3;</code> + * <code>int32 compress_body_threshold = 2;</code> * @return The compressBodyThreshold. */ @java.lang.Override @@ -1205,7 +957,7 @@ private static final long serialVersionUID = 0L; * threshold. * </pre> * - * <code>int32 compress_body_threshold = 3;</code> + * <code>int32 compress_body_threshold = 2;</code> * @param value The compressBodyThreshold to set. * @return This builder for chaining. */ @@ -1223,7 +975,7 @@ private static final long serialVersionUID = 0L; * threshold. * </pre> * - * <code>int32 compress_body_threshold = 3;</code> + * <code>int32 compress_body_threshold = 2;</code> * @return This builder for chaining. */ public Builder clearCompressBodyThreshold() { @@ -1241,7 +993,7 @@ private static final long serialVersionUID = 0L; * client-side check validation. * </pre> * - * <code>int32 max_body_size = 4;</code> + * <code>int32 max_body_size = 3;</code> * @return The maxBodySize. */ @java.lang.Override @@ -1255,7 +1007,7 @@ private static final long serialVersionUID = 0L; * client-side check validation. * </pre> * - * <code>int32 max_body_size = 4;</code> + * <code>int32 max_body_size = 3;</code> * @param value The maxBodySize to set. * @return This builder for chaining. */ @@ -1272,7 +1024,7 @@ private static final long serialVersionUID = 0L; * client-side check validation. * </pre> * - * <code>int32 max_body_size = 4;</code> + * <code>int32 max_body_size = 3;</code> * @return This builder for chaining. */ public Builder clearMaxBodySize() { diff --git a/src/main/java/apache/rocketmq/v2/PublishingOrBuilder.java b/src/main/java/apache/rocketmq/v2/PublishingOrBuilder.java index 96f31a6..c64a0ea 100644 --- a/src/main/java/apache/rocketmq/v2/PublishingOrBuilder.java +++ b/src/main/java/apache/rocketmq/v2/PublishingOrBuilder.java @@ -61,36 +61,6 @@ public interface PublishingOrBuilder extends apache.rocketmq.v2.ResourceOrBuilder getTopicsOrBuilder( int index); - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return Whether the retryPolicy field is set. - */ - boolean hasRetryPolicy(); - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - * @return The retryPolicy. - */ - apache.rocketmq.v2.RetryPolicy getRetryPolicy(); - /** - * <pre> - * If publishing of messages encounters throttle, producer clients shall - * apply backoff according to `retry_policy` - * </pre> - * - * <code>.apache.rocketmq.v2.RetryPolicy retry_policy = 2;</code> - */ - apache.rocketmq.v2.RetryPolicyOrBuilder getRetryPolicyOrBuilder(); - /** * <pre> * Publishing settings below here are from server, it is essential for @@ -99,7 +69,7 @@ public interface PublishingOrBuilder extends * threshold. * </pre> * - * <code>int32 compress_body_threshold = 3;</code> + * <code>int32 compress_body_threshold = 2;</code> * @return The compressBodyThreshold. */ int getCompressBodyThreshold(); @@ -111,7 +81,7 @@ public interface PublishingOrBuilder extends * client-side check validation. * </pre> * - * <code>int32 max_body_size = 4;</code> + * <code>int32 max_body_size = 3;</code> * @return The maxBodySize. */ int getMaxBodySize(); diff --git a/src/main/java/apache/rocketmq/v2/Settings.java b/src/main/java/apache/rocketmq/v2/Settings.java index ab58c63..d626778 100644 --- a/src/main/java/apache/rocketmq/v2/Settings.java +++ b/src/main/java/apache/rocketmq/v2/Settings.java @@ -70,6 +70,19 @@ private static final long serialVersionUID = 0L; break; } case 26: { + apache.rocketmq.v2.RetryPolicy.Builder subBuilder = null; + if (backoffPolicy_ != null) { + subBuilder = backoffPolicy_.toBuilder(); + } + backoffPolicy_ = input.readMessage(apache.rocketmq.v2.RetryPolicy.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(backoffPolicy_); + backoffPolicy_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { com.google.protobuf.Duration.Builder subBuilder = null; if (((bitField0_ & 0x00000004) != 0)) { subBuilder = requestTimeout_.toBuilder(); @@ -82,9 +95,9 @@ private static final long serialVersionUID = 0L; bitField0_ |= 0x00000004; break; } - case 34: { + case 42: { apache.rocketmq.v2.Publishing.Builder subBuilder = null; - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { subBuilder = ((apache.rocketmq.v2.Publishing) pubSub_).toBuilder(); } pubSub_ = @@ -93,12 +106,12 @@ private static final long serialVersionUID = 0L; subBuilder.mergeFrom((apache.rocketmq.v2.Publishing) pubSub_); pubSub_ = subBuilder.buildPartial(); } - pubSubCase_ = 4; + pubSubCase_ = 5; break; } - case 42: { + case 50: { apache.rocketmq.v2.Subscription.Builder subBuilder = null; - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { subBuilder = ((apache.rocketmq.v2.Subscription) pubSub_).toBuilder(); } pubSub_ = @@ -107,7 +120,7 @@ private static final long serialVersionUID = 0L; subBuilder.mergeFrom((apache.rocketmq.v2.Subscription) pubSub_); pubSub_ = subBuilder.buildPartial(); } - pubSubCase_ = 5; + pubSubCase_ = 6; break; } default: { @@ -148,8 +161,8 @@ private static final long serialVersionUID = 0L; public enum PubSubCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { - PUBLISHING(4), - SUBSCRIPTION(5), + PUBLISHING(5), + SUBSCRIPTION(6), PUBSUB_NOT_SET(0); private final int value; private PubSubCase(int value) { @@ -167,8 +180,8 @@ private static final long serialVersionUID = 0L; public static PubSubCase forNumber(int value) { switch (value) { - case 4: return PUBLISHING; - case 5: return SUBSCRIPTION; + case 5: return PUBLISHING; + case 6: return SUBSCRIPTION; case 0: return PUBSUB_NOT_SET; default: return null; } @@ -188,7 +201,7 @@ private static final long serialVersionUID = 0L; private int clientType_; /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -199,7 +212,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -210,7 +223,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -248,14 +261,73 @@ private static final long serialVersionUID = 0L; return accessPoint_ == null ? apache.rocketmq.v2.Endpoints.getDefaultInstance() : accessPoint_; } - public static final int REQUEST_TIMEOUT_FIELD_NUMBER = 3; + public static final int BACKOFF_POLICY_FIELD_NUMBER = 3; + private apache.rocketmq.v2.RetryPolicy backoffPolicy_; + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return Whether the backoffPolicy field is set. + */ + @java.lang.Override + public boolean hasBackoffPolicy() { + return backoffPolicy_ != null; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return The backoffPolicy. + */ + @java.lang.Override + public apache.rocketmq.v2.RetryPolicy getBackoffPolicy() { + return backoffPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + @java.lang.Override + public apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder() { + return getBackoffPolicy(); + } + + public static final int REQUEST_TIMEOUT_FIELD_NUMBER = 4; private com.google.protobuf.Duration requestTimeout_; /** * <pre> * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return Whether the requestTimeout field is set. */ @java.lang.Override @@ -267,7 +339,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return The requestTimeout. */ @java.lang.Override @@ -279,70 +351,70 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getRequestTimeoutOrBuilder() { return requestTimeout_ == null ? com.google.protobuf.Duration.getDefaultInstance() : requestTimeout_; } - public static final int PUBLISHING_FIELD_NUMBER = 4; + public static final int PUBLISHING_FIELD_NUMBER = 5; /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return Whether the publishing field is set. */ @java.lang.Override public boolean hasPublishing() { - return pubSubCase_ == 4; + return pubSubCase_ == 5; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return The publishing. */ @java.lang.Override public apache.rocketmq.v2.Publishing getPublishing() { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { return (apache.rocketmq.v2.Publishing) pubSub_; } return apache.rocketmq.v2.Publishing.getDefaultInstance(); } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ @java.lang.Override public apache.rocketmq.v2.PublishingOrBuilder getPublishingOrBuilder() { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { return (apache.rocketmq.v2.Publishing) pubSub_; } return apache.rocketmq.v2.Publishing.getDefaultInstance(); } - public static final int SUBSCRIPTION_FIELD_NUMBER = 5; + public static final int SUBSCRIPTION_FIELD_NUMBER = 6; /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return Whether the subscription field is set. */ @java.lang.Override public boolean hasSubscription() { - return pubSubCase_ == 5; + return pubSubCase_ == 6; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return The subscription. */ @java.lang.Override public apache.rocketmq.v2.Subscription getSubscription() { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { return (apache.rocketmq.v2.Subscription) pubSub_; } return apache.rocketmq.v2.Subscription.getDefaultInstance(); } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ @java.lang.Override public apache.rocketmq.v2.SubscriptionOrBuilder getSubscriptionOrBuilder() { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { return (apache.rocketmq.v2.Subscription) pubSub_; } return apache.rocketmq.v2.Subscription.getDefaultInstance(); @@ -368,14 +440,17 @@ private static final long serialVersionUID = 0L; if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(2, getAccessPoint()); } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(3, getRequestTimeout()); + if (backoffPolicy_ != null) { + output.writeMessage(3, getBackoffPolicy()); } - if (pubSubCase_ == 4) { - output.writeMessage(4, (apache.rocketmq.v2.Publishing) pubSub_); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getRequestTimeout()); } if (pubSubCase_ == 5) { - output.writeMessage(5, (apache.rocketmq.v2.Subscription) pubSub_); + output.writeMessage(5, (apache.rocketmq.v2.Publishing) pubSub_); + } + if (pubSubCase_ == 6) { + output.writeMessage(6, (apache.rocketmq.v2.Subscription) pubSub_); } unknownFields.writeTo(output); } @@ -394,17 +469,21 @@ private static final long serialVersionUID = 0L; size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getAccessPoint()); } - if (((bitField0_ & 0x00000004) != 0)) { + if (backoffPolicy_ != null) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getRequestTimeout()); + .computeMessageSize(3, getBackoffPolicy()); } - if (pubSubCase_ == 4) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (apache.rocketmq.v2.Publishing) pubSub_); + .computeMessageSize(4, getRequestTimeout()); } if (pubSubCase_ == 5) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (apache.rocketmq.v2.Subscription) pubSub_); + .computeMessageSize(5, (apache.rocketmq.v2.Publishing) pubSub_); + } + if (pubSubCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (apache.rocketmq.v2.Subscription) pubSub_); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -430,6 +509,11 @@ private static final long serialVersionUID = 0L; if (!getAccessPoint() .equals(other.getAccessPoint())) return false; } + if (hasBackoffPolicy() != other.hasBackoffPolicy()) return false; + if (hasBackoffPolicy()) { + if (!getBackoffPolicy() + .equals(other.getBackoffPolicy())) return false; + } if (hasRequestTimeout() != other.hasRequestTimeout()) return false; if (hasRequestTimeout()) { if (!getRequestTimeout() @@ -437,11 +521,11 @@ private static final long serialVersionUID = 0L; } if (!getPubSubCase().equals(other.getPubSubCase())) return false; switch (pubSubCase_) { - case 4: + case 5: if (!getPublishing() .equals(other.getPublishing())) return false; break; - case 5: + case 6: if (!getSubscription() .equals(other.getSubscription())) return false; break; @@ -467,16 +551,20 @@ private static final long serialVersionUID = 0L; hash = (37 * hash) + ACCESS_POINT_FIELD_NUMBER; hash = (53 * hash) + getAccessPoint().hashCode(); } + if (hasBackoffPolicy()) { + hash = (37 * hash) + BACKOFF_POLICY_FIELD_NUMBER; + hash = (53 * hash) + getBackoffPolicy().hashCode(); + } if (hasRequestTimeout()) { hash = (37 * hash) + REQUEST_TIMEOUT_FIELD_NUMBER; hash = (53 * hash) + getRequestTimeout().hashCode(); } switch (pubSubCase_) { - case 4: + case 5: hash = (37 * hash) + PUBLISHING_FIELD_NUMBER; hash = (53 * hash) + getPublishing().hashCode(); break; - case 5: + case 6: hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getSubscription().hashCode(); break; @@ -626,6 +714,12 @@ private static final long serialVersionUID = 0L; accessPointBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); + if (backoffPolicyBuilder_ == null) { + backoffPolicy_ = null; + } else { + backoffPolicy_ = null; + backoffPolicyBuilder_ = null; + } if (requestTimeoutBuilder_ == null) { requestTimeout_ = null; } else { @@ -674,6 +768,11 @@ private static final long serialVersionUID = 0L; } to_bitField0_ |= 0x00000002; } + if (backoffPolicyBuilder_ == null) { + result.backoffPolicy_ = backoffPolicy_; + } else { + result.backoffPolicy_ = backoffPolicyBuilder_.build(); + } if (((from_bitField0_ & 0x00000004) != 0)) { if (requestTimeoutBuilder_ == null) { result.requestTimeout_ = requestTimeout_; @@ -682,14 +781,14 @@ private static final long serialVersionUID = 0L; } to_bitField0_ |= 0x00000004; } - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { if (publishingBuilder_ == null) { result.pubSub_ = pubSub_; } else { result.pubSub_ = publishingBuilder_.build(); } } - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { if (subscriptionBuilder_ == null) { result.pubSub_ = pubSub_; } else { @@ -752,6 +851,9 @@ private static final long serialVersionUID = 0L; if (other.hasAccessPoint()) { mergeAccessPoint(other.getAccessPoint()); } + if (other.hasBackoffPolicy()) { + mergeBackoffPolicy(other.getBackoffPolicy()); + } if (other.hasRequestTimeout()) { mergeRequestTimeout(other.getRequestTimeout()); } @@ -816,7 +918,7 @@ private static final long serialVersionUID = 0L; private int clientType_ = 0; /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -827,7 +929,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -838,7 +940,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -853,7 +955,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -867,7 +969,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -885,7 +987,7 @@ private static final long serialVersionUID = 0L; } /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -1018,6 +1120,224 @@ private static final long serialVersionUID = 0L; return accessPointBuilder_; } + private apache.rocketmq.v2.RetryPolicy backoffPolicy_; + private com.google.protobuf.SingleFieldBuilderV3< + apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> backoffPolicyBuilder_; + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return Whether the backoffPolicy field is set. + */ + public boolean hasBackoffPolicy() { + return backoffPolicyBuilder_ != null || backoffPolicy_ != null; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return The backoffPolicy. + */ + public apache.rocketmq.v2.RetryPolicy getBackoffPolicy() { + if (backoffPolicyBuilder_ == null) { + return backoffPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; + } else { + return backoffPolicyBuilder_.getMessage(); + } + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public Builder setBackoffPolicy(apache.rocketmq.v2.RetryPolicy value) { + if (backoffPolicyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + backoffPolicy_ = value; + onChanged(); + } else { + backoffPolicyBuilder_.setMessage(value); + } + + return this; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public Builder setBackoffPolicy( + apache.rocketmq.v2.RetryPolicy.Builder builderForValue) { + if (backoffPolicyBuilder_ == null) { + backoffPolicy_ = builderForValue.build(); + onChanged(); + } else { + backoffPolicyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public Builder mergeBackoffPolicy(apache.rocketmq.v2.RetryPolicy value) { + if (backoffPolicyBuilder_ == null) { + if (backoffPolicy_ != null) { + backoffPolicy_ = + apache.rocketmq.v2.RetryPolicy.newBuilder(backoffPolicy_).mergeFrom(value).buildPartial(); + } else { + backoffPolicy_ = value; + } + onChanged(); + } else { + backoffPolicyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public Builder clearBackoffPolicy() { + if (backoffPolicyBuilder_ == null) { + backoffPolicy_ = null; + onChanged(); + } else { + backoffPolicy_ = null; + backoffPolicyBuilder_ = null; + } + + return this; + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public apache.rocketmq.v2.RetryPolicy.Builder getBackoffPolicyBuilder() { + + onChanged(); + return getBackoffPolicyFieldBuilder().getBuilder(); + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + public apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder() { + if (backoffPolicyBuilder_ != null) { + return backoffPolicyBuilder_.getMessageOrBuilder(); + } else { + return backoffPolicy_ == null ? + apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; + } + } + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> + getBackoffPolicyFieldBuilder() { + if (backoffPolicyBuilder_ == null) { + backoffPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder>( + getBackoffPolicy(), + getParentForChildren(), + isClean()); + backoffPolicy_ = null; + } + return backoffPolicyBuilder_; + } + private com.google.protobuf.Duration requestTimeout_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> requestTimeoutBuilder_; @@ -1026,7 +1346,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return Whether the requestTimeout field is set. */ public boolean hasRequestTimeout() { @@ -1037,7 +1357,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return The requestTimeout. */ public com.google.protobuf.Duration getRequestTimeout() { @@ -1052,7 +1372,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public Builder setRequestTimeout(com.google.protobuf.Duration value) { if (requestTimeoutBuilder_ == null) { @@ -1072,7 +1392,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public Builder setRequestTimeout( com.google.protobuf.Duration.Builder builderForValue) { @@ -1090,7 +1410,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public Builder mergeRequestTimeout(com.google.protobuf.Duration value) { if (requestTimeoutBuilder_ == null) { @@ -1114,7 +1434,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public Builder clearRequestTimeout() { if (requestTimeoutBuilder_ == null) { @@ -1131,7 +1451,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public com.google.protobuf.Duration.Builder getRequestTimeoutBuilder() { bitField0_ |= 0x00000004; @@ -1143,7 +1463,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ public com.google.protobuf.DurationOrBuilder getRequestTimeoutOrBuilder() { if (requestTimeoutBuilder_ != null) { @@ -1158,7 +1478,7 @@ private static final long serialVersionUID = 0L; * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> @@ -1177,33 +1497,33 @@ private static final long serialVersionUID = 0L; private com.google.protobuf.SingleFieldBuilderV3< apache.rocketmq.v2.Publishing, apache.rocketmq.v2.Publishing.Builder, apache.rocketmq.v2.PublishingOrBuilder> publishingBuilder_; /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return Whether the publishing field is set. */ @java.lang.Override public boolean hasPublishing() { - return pubSubCase_ == 4; + return pubSubCase_ == 5; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return The publishing. */ @java.lang.Override public apache.rocketmq.v2.Publishing getPublishing() { if (publishingBuilder_ == null) { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { return (apache.rocketmq.v2.Publishing) pubSub_; } return apache.rocketmq.v2.Publishing.getDefaultInstance(); } else { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { return publishingBuilder_.getMessage(); } return apache.rocketmq.v2.Publishing.getDefaultInstance(); } } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ public Builder setPublishing(apache.rocketmq.v2.Publishing value) { if (publishingBuilder_ == null) { @@ -1215,11 +1535,11 @@ private static final long serialVersionUID = 0L; } else { publishingBuilder_.setMessage(value); } - pubSubCase_ = 4; + pubSubCase_ = 5; return this; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ public Builder setPublishing( apache.rocketmq.v2.Publishing.Builder builderForValue) { @@ -1229,15 +1549,15 @@ private static final long serialVersionUID = 0L; } else { publishingBuilder_.setMessage(builderForValue.build()); } - pubSubCase_ = 4; + pubSubCase_ = 5; return this; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ public Builder mergePublishing(apache.rocketmq.v2.Publishing value) { if (publishingBuilder_ == null) { - if (pubSubCase_ == 4 && + if (pubSubCase_ == 5 && pubSub_ != apache.rocketmq.v2.Publishing.getDefaultInstance()) { pubSub_ = apache.rocketmq.v2.Publishing.newBuilder((apache.rocketmq.v2.Publishing) pubSub_) .mergeFrom(value).buildPartial(); @@ -1246,26 +1566,26 @@ private static final long serialVersionUID = 0L; } onChanged(); } else { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { publishingBuilder_.mergeFrom(value); } publishingBuilder_.setMessage(value); } - pubSubCase_ = 4; + pubSubCase_ = 5; return this; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ public Builder clearPublishing() { if (publishingBuilder_ == null) { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { pubSubCase_ = 0; pubSub_ = null; onChanged(); } } else { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { pubSubCase_ = 0; pubSub_ = null; } @@ -1274,33 +1594,33 @@ private static final long serialVersionUID = 0L; return this; } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ public apache.rocketmq.v2.Publishing.Builder getPublishingBuilder() { return getPublishingFieldBuilder().getBuilder(); } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ @java.lang.Override public apache.rocketmq.v2.PublishingOrBuilder getPublishingOrBuilder() { - if ((pubSubCase_ == 4) && (publishingBuilder_ != null)) { + if ((pubSubCase_ == 5) && (publishingBuilder_ != null)) { return publishingBuilder_.getMessageOrBuilder(); } else { - if (pubSubCase_ == 4) { + if (pubSubCase_ == 5) { return (apache.rocketmq.v2.Publishing) pubSub_; } return apache.rocketmq.v2.Publishing.getDefaultInstance(); } } /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ private com.google.protobuf.SingleFieldBuilderV3< apache.rocketmq.v2.Publishing, apache.rocketmq.v2.Publishing.Builder, apache.rocketmq.v2.PublishingOrBuilder> getPublishingFieldBuilder() { if (publishingBuilder_ == null) { - if (!(pubSubCase_ == 4)) { + if (!(pubSubCase_ == 5)) { pubSub_ = apache.rocketmq.v2.Publishing.getDefaultInstance(); } publishingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -1310,7 +1630,7 @@ private static final long serialVersionUID = 0L; isClean()); pubSub_ = null; } - pubSubCase_ = 4; + pubSubCase_ = 5; onChanged();; return publishingBuilder_; } @@ -1318,33 +1638,33 @@ private static final long serialVersionUID = 0L; private com.google.protobuf.SingleFieldBuilderV3< apache.rocketmq.v2.Subscription, apache.rocketmq.v2.Subscription.Builder, apache.rocketmq.v2.SubscriptionOrBuilder> subscriptionBuilder_; /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return Whether the subscription field is set. */ @java.lang.Override public boolean hasSubscription() { - return pubSubCase_ == 5; + return pubSubCase_ == 6; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return The subscription. */ @java.lang.Override public apache.rocketmq.v2.Subscription getSubscription() { if (subscriptionBuilder_ == null) { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { return (apache.rocketmq.v2.Subscription) pubSub_; } return apache.rocketmq.v2.Subscription.getDefaultInstance(); } else { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { return subscriptionBuilder_.getMessage(); } return apache.rocketmq.v2.Subscription.getDefaultInstance(); } } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ public Builder setSubscription(apache.rocketmq.v2.Subscription value) { if (subscriptionBuilder_ == null) { @@ -1356,11 +1676,11 @@ private static final long serialVersionUID = 0L; } else { subscriptionBuilder_.setMessage(value); } - pubSubCase_ = 5; + pubSubCase_ = 6; return this; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ public Builder setSubscription( apache.rocketmq.v2.Subscription.Builder builderForValue) { @@ -1370,15 +1690,15 @@ private static final long serialVersionUID = 0L; } else { subscriptionBuilder_.setMessage(builderForValue.build()); } - pubSubCase_ = 5; + pubSubCase_ = 6; return this; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ public Builder mergeSubscription(apache.rocketmq.v2.Subscription value) { if (subscriptionBuilder_ == null) { - if (pubSubCase_ == 5 && + if (pubSubCase_ == 6 && pubSub_ != apache.rocketmq.v2.Subscription.getDefaultInstance()) { pubSub_ = apache.rocketmq.v2.Subscription.newBuilder((apache.rocketmq.v2.Subscription) pubSub_) .mergeFrom(value).buildPartial(); @@ -1387,26 +1707,26 @@ private static final long serialVersionUID = 0L; } onChanged(); } else { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { subscriptionBuilder_.mergeFrom(value); } subscriptionBuilder_.setMessage(value); } - pubSubCase_ = 5; + pubSubCase_ = 6; return this; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ public Builder clearSubscription() { if (subscriptionBuilder_ == null) { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { pubSubCase_ = 0; pubSub_ = null; onChanged(); } } else { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { pubSubCase_ = 0; pubSub_ = null; } @@ -1415,33 +1735,33 @@ private static final long serialVersionUID = 0L; return this; } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ public apache.rocketmq.v2.Subscription.Builder getSubscriptionBuilder() { return getSubscriptionFieldBuilder().getBuilder(); } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ @java.lang.Override public apache.rocketmq.v2.SubscriptionOrBuilder getSubscriptionOrBuilder() { - if ((pubSubCase_ == 5) && (subscriptionBuilder_ != null)) { + if ((pubSubCase_ == 6) && (subscriptionBuilder_ != null)) { return subscriptionBuilder_.getMessageOrBuilder(); } else { - if (pubSubCase_ == 5) { + if (pubSubCase_ == 6) { return (apache.rocketmq.v2.Subscription) pubSub_; } return apache.rocketmq.v2.Subscription.getDefaultInstance(); } } /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ private com.google.protobuf.SingleFieldBuilderV3< apache.rocketmq.v2.Subscription, apache.rocketmq.v2.Subscription.Builder, apache.rocketmq.v2.SubscriptionOrBuilder> getSubscriptionFieldBuilder() { if (subscriptionBuilder_ == null) { - if (!(pubSubCase_ == 5)) { + if (!(pubSubCase_ == 6)) { pubSub_ = apache.rocketmq.v2.Subscription.getDefaultInstance(); } subscriptionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< @@ -1451,7 +1771,7 @@ private static final long serialVersionUID = 0L; isClean()); pubSub_ = null; } - pubSubCase_ = 5; + pubSubCase_ = 6; onChanged();; return subscriptionBuilder_; } diff --git a/src/main/java/apache/rocketmq/v2/SettingsOrBuilder.java b/src/main/java/apache/rocketmq/v2/SettingsOrBuilder.java index 6a038ab..0bdb176 100644 --- a/src/main/java/apache/rocketmq/v2/SettingsOrBuilder.java +++ b/src/main/java/apache/rocketmq/v2/SettingsOrBuilder.java @@ -9,7 +9,7 @@ public interface SettingsOrBuilder extends /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -18,7 +18,7 @@ public interface SettingsOrBuilder extends boolean hasClientType(); /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -27,7 +27,7 @@ public interface SettingsOrBuilder extends int getClientTypeValue(); /** * <pre> - * Common settings for all kind of clients. + * Configurations for all clients. * </pre> * * <code>optional .apache.rocketmq.v2.ClientType client_type = 1;</code> @@ -50,12 +50,60 @@ public interface SettingsOrBuilder extends */ apache.rocketmq.v2.EndpointsOrBuilder getAccessPointOrBuilder(); + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return Whether the backoffPolicy field is set. + */ + boolean hasBackoffPolicy(); + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + * @return The backoffPolicy. + */ + apache.rocketmq.v2.RetryPolicy getBackoffPolicy(); + /** + * <pre> + * If publishing of messages encounters throttling or server internal errors, + * publishers should implement automatic retries after progressive longer + * back-offs for consecutive errors. + * When processing message fails, `backoff_policy` describes an interval + * after which the message should be available to consume again. + * For FIFO messages, the interval should be relatively small because + * messages of the same message group would not be readily available utill + * the prior one depletes its lifecycle. + * </pre> + * + * <code>.apache.rocketmq.v2.RetryPolicy backoff_policy = 3;</code> + */ + apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder(); + /** * <pre> * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return Whether the requestTimeout field is set. */ boolean hasRequestTimeout(); @@ -64,7 +112,7 @@ public interface SettingsOrBuilder extends * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> * @return The requestTimeout. */ com.google.protobuf.Duration getRequestTimeout(); @@ -73,37 +121,37 @@ public interface SettingsOrBuilder extends * Request timeout for RPCs excluding long-polling. * </pre> * - * <code>optional .google.protobuf.Duration request_timeout = 3;</code> + * <code>optional .google.protobuf.Duration request_timeout = 4;</code> */ com.google.protobuf.DurationOrBuilder getRequestTimeoutOrBuilder(); /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return Whether the publishing field is set. */ boolean hasPublishing(); /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> * @return The publishing. */ apache.rocketmq.v2.Publishing getPublishing(); /** - * <code>.apache.rocketmq.v2.Publishing publishing = 4;</code> + * <code>.apache.rocketmq.v2.Publishing publishing = 5;</code> */ apache.rocketmq.v2.PublishingOrBuilder getPublishingOrBuilder(); /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return Whether the subscription field is set. */ boolean hasSubscription(); /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> * @return The subscription. */ apache.rocketmq.v2.Subscription getSubscription(); /** - * <code>.apache.rocketmq.v2.Subscription subscription = 5;</code> + * <code>.apache.rocketmq.v2.Subscription subscription = 6;</code> */ apache.rocketmq.v2.SubscriptionOrBuilder getSubscriptionOrBuilder(); diff --git a/src/main/java/apache/rocketmq/v2/Subscription.java b/src/main/java/apache/rocketmq/v2/Subscription.java index b350122..36a32c9 100644 --- a/src/main/java/apache/rocketmq/v2/Subscription.java +++ b/src/main/java/apache/rocketmq/v2/Subscription.java @@ -77,27 +77,14 @@ private static final long serialVersionUID = 0L; fifo_ = input.readBool(); break; } - case 34: { - apache.rocketmq.v2.RetryPolicy.Builder subBuilder = null; - if (((bitField0_ & 0x00000004) != 0)) { - subBuilder = backoffPolicy_.toBuilder(); - } - backoffPolicy_ = input.readMessage(apache.rocketmq.v2.RetryPolicy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backoffPolicy_); - backoffPolicy_ = subBuilder.buildPartial(); - } + case 32: { bitField0_ |= 0x00000004; - break; - } - case 40: { - bitField0_ |= 0x00000008; receiveBatchSize_ = input.readInt32(); break; } - case 50: { + case 42: { com.google.protobuf.Duration.Builder subBuilder = null; - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { subBuilder = longPollingTimeout_.toBuilder(); } longPollingTimeout_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); @@ -105,7 +92,7 @@ private static final long serialVersionUID = 0L; subBuilder.mergeFrom(longPollingTimeout_); longPollingTimeout_ = subBuilder.buildPartial(); } - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; break; } default: { @@ -285,76 +272,26 @@ private static final long serialVersionUID = 0L; return fifo_; } - public static final int BACKOFF_POLICY_FIELD_NUMBER = 4; - private apache.rocketmq.v2.RetryPolicy backoffPolicy_; - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return Whether the backoffPolicy field is set. - */ - @java.lang.Override - public boolean hasBackoffPolicy() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return The backoffPolicy. - */ - @java.lang.Override - public apache.rocketmq.v2.RetryPolicy getBackoffPolicy() { - return backoffPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - @java.lang.Override - public apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder() { - return backoffPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; - } - - public static final int RECEIVE_BATCH_SIZE_FIELD_NUMBER = 5; + public static final int RECEIVE_BATCH_SIZE_FIELD_NUMBER = 4; private int receiveBatchSize_; /** * <pre> * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return Whether the receiveBatchSize field is set. */ @java.lang.Override public boolean hasReceiveBatchSize() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** * <pre> * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return The receiveBatchSize. */ @java.lang.Override @@ -362,7 +299,7 @@ private static final long serialVersionUID = 0L; return receiveBatchSize_; } - public static final int LONG_POLLING_TIMEOUT_FIELD_NUMBER = 6; + public static final int LONG_POLLING_TIMEOUT_FIELD_NUMBER = 5; private com.google.protobuf.Duration longPollingTimeout_; /** * <pre> @@ -370,12 +307,12 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return Whether the longPollingTimeout field is set. */ @java.lang.Override public boolean hasLongPollingTimeout() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * <pre> @@ -383,7 +320,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return The longPollingTimeout. */ @java.lang.Override @@ -396,7 +333,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ @java.lang.Override public com.google.protobuf.DurationOrBuilder getLongPollingTimeoutOrBuilder() { @@ -427,13 +364,10 @@ private static final long serialVersionUID = 0L; output.writeBool(3, fifo_); } if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getBackoffPolicy()); + output.writeInt32(4, receiveBatchSize_); } if (((bitField0_ & 0x00000008) != 0)) { - output.writeInt32(5, receiveBatchSize_); - } - if (((bitField0_ & 0x00000010) != 0)) { - output.writeMessage(6, getLongPollingTimeout()); + output.writeMessage(5, getLongPollingTimeout()); } unknownFields.writeTo(output); } @@ -458,15 +392,11 @@ private static final long serialVersionUID = 0L; } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getBackoffPolicy()); + .computeInt32Size(4, receiveBatchSize_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, receiveBatchSize_); - } - if (((bitField0_ & 0x00000010) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, getLongPollingTimeout()); + .computeMessageSize(5, getLongPollingTimeout()); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -495,11 +425,6 @@ private static final long serialVersionUID = 0L; if (getFifo() != other.getFifo()) return false; } - if (hasBackoffPolicy() != other.hasBackoffPolicy()) return false; - if (hasBackoffPolicy()) { - if (!getBackoffPolicy() - .equals(other.getBackoffPolicy())) return false; - } if (hasReceiveBatchSize() != other.hasReceiveBatchSize()) return false; if (hasReceiveBatchSize()) { if (getReceiveBatchSize() @@ -534,10 +459,6 @@ private static final long serialVersionUID = 0L; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFifo()); } - if (hasBackoffPolicy()) { - hash = (37 * hash) + BACKOFF_POLICY_FIELD_NUMBER; - hash = (53 * hash) + getBackoffPolicy().hashCode(); - } if (hasReceiveBatchSize()) { hash = (37 * hash) + RECEIVE_BATCH_SIZE_FIELD_NUMBER; hash = (53 * hash) + getReceiveBatchSize(); @@ -676,7 +597,6 @@ private static final long serialVersionUID = 0L; .alwaysUseFieldBuilders) { getGroupFieldBuilder(); getSubscriptionsFieldBuilder(); - getBackoffPolicyFieldBuilder(); getLongPollingTimeoutFieldBuilder(); } } @@ -697,20 +617,14 @@ private static final long serialVersionUID = 0L; } fifo_ = false; bitField0_ = (bitField0_ & ~0x00000004); - if (backoffPolicyBuilder_ == null) { - backoffPolicy_ = null; - } else { - backoffPolicyBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); receiveBatchSize_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); if (longPollingTimeoutBuilder_ == null) { longPollingTimeout_ = null; } else { longPollingTimeoutBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -761,24 +675,16 @@ private static final long serialVersionUID = 0L; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000008) != 0)) { - if (backoffPolicyBuilder_ == null) { - result.backoffPolicy_ = backoffPolicy_; - } else { - result.backoffPolicy_ = backoffPolicyBuilder_.build(); - } + result.receiveBatchSize_ = receiveBatchSize_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000010) != 0)) { - result.receiveBatchSize_ = receiveBatchSize_; - to_bitField0_ |= 0x00000008; - } - if (((from_bitField0_ & 0x00000020) != 0)) { if (longPollingTimeoutBuilder_ == null) { result.longPollingTimeout_ = longPollingTimeout_; } else { result.longPollingTimeout_ = longPollingTimeoutBuilder_.build(); } - to_bitField0_ |= 0x00000010; + to_bitField0_ |= 0x00000008; } result.bitField0_ = to_bitField0_; onBuilt(); @@ -861,9 +767,6 @@ private static final long serialVersionUID = 0L; if (other.hasFifo()) { setFifo(other.getFifo()); } - if (other.hasBackoffPolicy()) { - mergeBackoffPolicy(other.getBackoffPolicy()); - } if (other.hasReceiveBatchSize()) { setReceiveBatchSize(other.getReceiveBatchSize()); } @@ -1461,217 +1364,25 @@ private static final long serialVersionUID = 0L; return this; } - private apache.rocketmq.v2.RetryPolicy backoffPolicy_; - private com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> backoffPolicyBuilder_; - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return Whether the backoffPolicy field is set. - */ - public boolean hasBackoffPolicy() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return The backoffPolicy. - */ - public apache.rocketmq.v2.RetryPolicy getBackoffPolicy() { - if (backoffPolicyBuilder_ == null) { - return backoffPolicy_ == null ? apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; - } else { - return backoffPolicyBuilder_.getMessage(); - } - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public Builder setBackoffPolicy(apache.rocketmq.v2.RetryPolicy value) { - if (backoffPolicyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - backoffPolicy_ = value; - onChanged(); - } else { - backoffPolicyBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public Builder setBackoffPolicy( - apache.rocketmq.v2.RetryPolicy.Builder builderForValue) { - if (backoffPolicyBuilder_ == null) { - backoffPolicy_ = builderForValue.build(); - onChanged(); - } else { - backoffPolicyBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public Builder mergeBackoffPolicy(apache.rocketmq.v2.RetryPolicy value) { - if (backoffPolicyBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - backoffPolicy_ != null && - backoffPolicy_ != apache.rocketmq.v2.RetryPolicy.getDefaultInstance()) { - backoffPolicy_ = - apache.rocketmq.v2.RetryPolicy.newBuilder(backoffPolicy_).mergeFrom(value).buildPartial(); - } else { - backoffPolicy_ = value; - } - onChanged(); - } else { - backoffPolicyBuilder_.mergeFrom(value); - } - bitField0_ |= 0x00000008; - return this; - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public Builder clearBackoffPolicy() { - if (backoffPolicyBuilder_ == null) { - backoffPolicy_ = null; - onChanged(); - } else { - backoffPolicyBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - return this; - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public apache.rocketmq.v2.RetryPolicy.Builder getBackoffPolicyBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getBackoffPolicyFieldBuilder().getBuilder(); - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - public apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder() { - if (backoffPolicyBuilder_ != null) { - return backoffPolicyBuilder_.getMessageOrBuilder(); - } else { - return backoffPolicy_ == null ? - apache.rocketmq.v2.RetryPolicy.getDefaultInstance() : backoffPolicy_; - } - } - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder> - getBackoffPolicyFieldBuilder() { - if (backoffPolicyBuilder_ == null) { - backoffPolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - apache.rocketmq.v2.RetryPolicy, apache.rocketmq.v2.RetryPolicy.Builder, apache.rocketmq.v2.RetryPolicyOrBuilder>( - getBackoffPolicy(), - getParentForChildren(), - isClean()); - backoffPolicy_ = null; - } - return backoffPolicyBuilder_; - } - private int receiveBatchSize_ ; /** * <pre> * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return Whether the receiveBatchSize field is set. */ @java.lang.Override public boolean hasReceiveBatchSize() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000008) != 0); } /** * <pre> * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return The receiveBatchSize. */ @java.lang.Override @@ -1683,12 +1394,12 @@ private static final long serialVersionUID = 0L; * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @param value The receiveBatchSize to set. * @return This builder for chaining. */ public Builder setReceiveBatchSize(int value) { - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; receiveBatchSize_ = value; onChanged(); return this; @@ -1698,11 +1409,11 @@ private static final long serialVersionUID = 0L; * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return This builder for chaining. */ public Builder clearReceiveBatchSize() { - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); receiveBatchSize_ = 0; onChanged(); return this; @@ -1717,11 +1428,11 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return Whether the longPollingTimeout field is set. */ public boolean hasLongPollingTimeout() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000010) != 0); } /** * <pre> @@ -1729,7 +1440,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return The longPollingTimeout. */ public com.google.protobuf.Duration getLongPollingTimeout() { @@ -1745,7 +1456,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public Builder setLongPollingTimeout(com.google.protobuf.Duration value) { if (longPollingTimeoutBuilder_ == null) { @@ -1757,7 +1468,7 @@ private static final long serialVersionUID = 0L; } else { longPollingTimeoutBuilder_.setMessage(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return this; } /** @@ -1766,7 +1477,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public Builder setLongPollingTimeout( com.google.protobuf.Duration.Builder builderForValue) { @@ -1776,7 +1487,7 @@ private static final long serialVersionUID = 0L; } else { longPollingTimeoutBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return this; } /** @@ -1785,11 +1496,11 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public Builder mergeLongPollingTimeout(com.google.protobuf.Duration value) { if (longPollingTimeoutBuilder_ == null) { - if (((bitField0_ & 0x00000020) != 0) && + if (((bitField0_ & 0x00000010) != 0) && longPollingTimeout_ != null && longPollingTimeout_ != com.google.protobuf.Duration.getDefaultInstance()) { longPollingTimeout_ = @@ -1801,7 +1512,7 @@ private static final long serialVersionUID = 0L; } else { longPollingTimeoutBuilder_.mergeFrom(value); } - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; return this; } /** @@ -1810,7 +1521,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public Builder clearLongPollingTimeout() { if (longPollingTimeoutBuilder_ == null) { @@ -1819,7 +1530,7 @@ private static final long serialVersionUID = 0L; } else { longPollingTimeoutBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000010); return this; } /** @@ -1828,10 +1539,10 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public com.google.protobuf.Duration.Builder getLongPollingTimeoutBuilder() { - bitField0_ |= 0x00000020; + bitField0_ |= 0x00000010; onChanged(); return getLongPollingTimeoutFieldBuilder().getBuilder(); } @@ -1841,7 +1552,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ public com.google.protobuf.DurationOrBuilder getLongPollingTimeoutOrBuilder() { if (longPollingTimeoutBuilder_ != null) { @@ -1857,7 +1568,7 @@ private static final long serialVersionUID = 0L; * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> diff --git a/src/main/java/apache/rocketmq/v2/SubscriptionOrBuilder.java b/src/main/java/apache/rocketmq/v2/SubscriptionOrBuilder.java index e260d27..f112d38 100644 --- a/src/main/java/apache/rocketmq/v2/SubscriptionOrBuilder.java +++ b/src/main/java/apache/rocketmq/v2/SubscriptionOrBuilder.java @@ -113,51 +113,12 @@ public interface SubscriptionOrBuilder extends */ boolean getFifo(); - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return Whether the backoffPolicy field is set. - */ - boolean hasBackoffPolicy(); - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - * @return The backoffPolicy. - */ - apache.rocketmq.v2.RetryPolicy getBackoffPolicy(); - /** - * <pre> - * When processing message fails, `backoff_policy` describes an interval - * after which the message is ready to consume again. - * For FIFO messages, the interval should be relatively small because - * messages of the same message group would not be readily available utill - * the prior one depletes its lifecycle. - * </pre> - * - * <code>optional .apache.rocketmq.v2.RetryPolicy backoff_policy = 4;</code> - */ - apache.rocketmq.v2.RetryPolicyOrBuilder getBackoffPolicyOrBuilder(); - /** * <pre> * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return Whether the receiveBatchSize field is set. */ boolean hasReceiveBatchSize(); @@ -166,7 +127,7 @@ public interface SubscriptionOrBuilder extends * Message receive batch size here is essential for push consumer. * </pre> * - * <code>optional int32 receive_batch_size = 5;</code> + * <code>optional int32 receive_batch_size = 4;</code> * @return The receiveBatchSize. */ int getReceiveBatchSize(); @@ -177,7 +138,7 @@ public interface SubscriptionOrBuilder extends * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return Whether the longPollingTimeout field is set. */ boolean hasLongPollingTimeout(); @@ -187,7 +148,7 @@ public interface SubscriptionOrBuilder extends * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> * @return The longPollingTimeout. */ com.google.protobuf.Duration getLongPollingTimeout(); @@ -197,7 +158,7 @@ public interface SubscriptionOrBuilder extends * push consumer. * </pre> * - * <code>optional .google.protobuf.Duration long_polling_timeout = 6;</code> + * <code>optional .google.protobuf.Duration long_polling_timeout = 5;</code> */ com.google.protobuf.DurationOrBuilder getLongPollingTimeoutOrBuilder(); } diff --git a/src/main/resources/proto/apache/rocketmq/v2/service.proto b/src/main/resources/proto/apache/rocketmq/v2/service.proto index 34c48d3..b9cf533 100644 --- a/src/main/resources/proto/apache/rocketmq/v2/service.proto +++ b/src/main/resources/proto/apache/rocketmq/v2/service.proto @@ -185,21 +185,17 @@ message Publishing { // List of topics to which messages will publish to. repeated Resource topics = 1; - // If publishing of messages encounters throttle, producer clients shall - // apply backoff according to `retry_policy` - RetryPolicy retry_policy = 2; - // Publishing settings below here are from server, it is essential for // server to push. // // Body of message will be deflated if its size in bytes exceeds the // threshold. - int32 compress_body_threshold = 3; + int32 compress_body_threshold = 2; // If the message body size exceeds `max_body_size`, broker servers would // reject the request. As a result, it is advisable that Producer performs // client-side check validation. - int32 max_body_size = 4; + int32 max_body_size = 3; } message Subscription { @@ -222,33 +218,39 @@ message Subscription { // ones are completely acknowledged. optional bool fifo = 3; - // When processing message fails, `backoff_policy` describes an interval - // after which the message is ready to consume again. - // - // For FIFO messages, the interval should be relatively small because - // messages of the same message group would not be readily available utill - // the prior one depletes its lifecycle. - optional RetryPolicy backoff_policy = 4; - // Message receive batch size here is essential for push consumer. - optional int32 receive_batch_size = 5; + optional int32 receive_batch_size = 4; // Long-polling timeout for `ReceiveMessageRequest`, which is essential for // push consumer. - optional google.protobuf.Duration long_polling_timeout = 6; + optional google.protobuf.Duration long_polling_timeout = 5; } message Settings { - // Common settings for all kind of clients. + // Configurations for all clients. optional ClientType client_type = 1; + optional Endpoints access_point = 2; + // If publishing of messages encounters throttling or server internal errors, + // publishers should implement automatic retries after progressive longer + // back-offs for consecutive errors. + // + // When processing message fails, `backoff_policy` describes an interval + // after which the message should be available to consume again. + // + // For FIFO messages, the interval should be relatively small because + // messages of the same message group would not be readily available utill + // the prior one depletes its lifecycle. + RetryPolicy backoff_policy = 3; + // Request timeout for RPCs excluding long-polling. - optional google.protobuf.Duration request_timeout = 3; + optional google.protobuf.Duration request_timeout = 4; oneof pub_sub { - Publishing publishing = 4; - Subscription subscription = 5; + Publishing publishing = 5; + + Subscription subscription = 6; } }
