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 74d2fb415364e1f121cafefd03035f5e79112562 Author: 凌楚 <[email protected]> AuthorDate: Wed Jun 29 20:04:30 2022 +0800 Apply IDL update --- src/main/java/apache/rocketmq/v2/Code.java | 598 +++++++++++---------- src/main/java/apache/rocketmq/v2/MQDomain.java | 61 ++- src/main/java/apache/rocketmq/v2/Status.java | 4 +- .../proto/apache/rocketmq/v2/definition.proto | 160 +++--- 4 files changed, 432 insertions(+), 391 deletions(-) diff --git a/src/main/java/apache/rocketmq/v2/Code.java b/src/main/java/apache/rocketmq/v2/Code.java index 198bc79..8f2f7c7 100644 --- a/src/main/java/apache/rocketmq/v2/Code.java +++ b/src/main/java/apache/rocketmq/v2/Code.java @@ -8,619 +8,661 @@ package apache.rocketmq.v2; */ public enum Code implements com.google.protobuf.ProtocolMessageEnum { + /** + * <code>CODE_UNSPECIFIED = 0;</code> + */ + CODE_UNSPECIFIED(0), /** * <pre> - * Success. + * Generic code for success. * </pre> * - * <code>OK = 0;</code> + * <code>OK = 20000;</code> */ - OK(0), + OK(20000), /** * <pre> - * Format of access point is illegal. + * Generic code for multiple return results. * </pre> * - * <code>ILLEGAL_ACCESS_POINT = 1;</code> + * <code>MULTIPLE_RESULTS = 30000;</code> */ - ILLEGAL_ACCESS_POINT(1), + MULTIPLE_RESULTS(30000), /** * <pre> - * Format of topic is illegal. + * Generic code for bad request, indicating that required fields or headers are missing. * </pre> * - * <code>ILLEGAL_TOPIC = 2;</code> + * <code>BAD_REQUEST = 40000;</code> */ - ILLEGAL_TOPIC(2), + BAD_REQUEST(40000), /** * <pre> - * Format of consumer group is illegal. + * Format of access point is illegal. * </pre> * - * <code>ILLEGAL_CONSUMER_GROUP = 3;</code> + * <code>ILLEGAL_ACCESS_POINT = 40001;</code> */ - ILLEGAL_CONSUMER_GROUP(3), + ILLEGAL_ACCESS_POINT(40001), /** * <pre> - * Format of message tag is illegal. + * Format of topic is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_TAG = 4;</code> + * <code>ILLEGAL_TOPIC = 40002;</code> */ - ILLEGAL_MESSAGE_TAG(4), + ILLEGAL_TOPIC(40002), /** * <pre> - * Format of message key is illegal. + * Format of consumer group is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_KEY = 5;</code> + * <code>ILLEGAL_CONSUMER_GROUP = 40003;</code> */ - ILLEGAL_MESSAGE_KEY(5), + ILLEGAL_CONSUMER_GROUP(40003), /** * <pre> - * Size of message keys exceeds the threshold. + * Format of message tag is illegal. + * </pre> + * + * <code>ILLEGAL_MESSAGE_TAG = 40004;</code> + */ + ILLEGAL_MESSAGE_TAG(40004), + /** + * <pre> + * Format of message key is illegal. * </pre> * - * <code>MESSAGE_KEYS_TOO_LARGE = 6;</code> + * <code>ILLEGAL_MESSAGE_KEY = 40005;</code> */ - MESSAGE_KEYS_TOO_LARGE(6), + ILLEGAL_MESSAGE_KEY(40005), /** * <pre> * Format of message group is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_GROUP = 7;</code> + * <code>ILLEGAL_MESSAGE_GROUP = 40006;</code> */ - ILLEGAL_MESSAGE_GROUP(7), + ILLEGAL_MESSAGE_GROUP(40006), /** * <pre> * Format of message property key is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_PROPERTY_KEY = 8;</code> + * <code>ILLEGAL_MESSAGE_PROPERTY_KEY = 40007;</code> */ - ILLEGAL_MESSAGE_PROPERTY_KEY(8), + ILLEGAL_MESSAGE_PROPERTY_KEY(40007), /** * <pre> * Message properties total size exceeds the threshold. * </pre> * - * <code>MESSAGE_PROPERTIES_TOO_LARGE = 9;</code> + * <code>MESSAGE_PROPERTIES_TOO_LARGE = 40008;</code> */ - MESSAGE_PROPERTIES_TOO_LARGE(9), + MESSAGE_PROPERTIES_TOO_LARGE(40008), /** * <pre> * Message body size exceeds the threshold. * </pre> * - * <code>MESSAGE_BODY_TOO_LARGE = 10;</code> + * <code>MESSAGE_BODY_TOO_LARGE = 40009;</code> */ - MESSAGE_BODY_TOO_LARGE(10), + MESSAGE_BODY_TOO_LARGE(40009), /** * <pre> - * User does not have the permission to operate. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403 + * Transaction id is invalid. * </pre> * - * <code>FORBIDDEN = 403;</code> + * <code>INVALID_TRANSACTION_ID = 40010;</code> */ - FORBIDDEN(403), + INVALID_TRANSACTION_ID(40010), /** * <pre> - * Code indicates that the client request has not been completed - * because it lacks valid authentication credentials for the - * requested resource. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 + * Format of message id is illegal. * </pre> * - * <code>UNAUTHORIZED = 401;</code> + * <code>ILLEGAL_MESSAGE_ID = 40011;</code> */ - UNAUTHORIZED(401), + ILLEGAL_MESSAGE_ID(40011), /** * <pre> - * Topic resource does not exist. + * Format of filter expression is illegal. * </pre> * - * <code>TOPIC_NOT_FOUND = 13;</code> + * <code>ILLEGAL_FILTER_EXPRESSION = 40012;</code> */ - TOPIC_NOT_FOUND(13), + ILLEGAL_FILTER_EXPRESSION(40012), /** * <pre> - * Consumer group resource does not exist. + * Receipt handle of message is invalid. * </pre> * - * <code>CONSUMER_GROUP_NOT_FOUND = 14;</code> + * <code>INVALID_RECEIPT_HANDLE = 40013;</code> */ - CONSUMER_GROUP_NOT_FOUND(14), + INVALID_RECEIPT_HANDLE(40013), /** * <pre> - * Not allowed to verify message. Chances are that you are verifying - * a FIFO message, as is violating FIFO semantics. + * Message property is not match the message type. * </pre> * - * <code>VERIFY_MESSAGE_FORBIDDEN = 15;</code> + * <code>MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 40014;</code> */ - VERIFY_MESSAGE_FORBIDDEN(15), + MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE(40014), /** * <pre> - * Failed to consume message. + * Client type could not be recognized. * </pre> * - * <code>FAILED_TO_CONSUME_MESSAGE = 16;</code> + * <code>UNRECOGNIZED_CLIENT_TYPE = 40015;</code> */ - FAILED_TO_CONSUME_MESSAGE(16), + UNRECOGNIZED_CLIENT_TYPE(40015), /** * <pre> * Message is corrupted. * </pre> * - * <code>MESSAGE_CORRUPTED = 17;</code> + * <code>MESSAGE_CORRUPTED = 40016;</code> */ - MESSAGE_CORRUPTED(17), + MESSAGE_CORRUPTED(40016), /** * <pre> - * Too many requests are made in short period of duration. - * Requests are throttled. + * Request is rejected due to missing of x-mq-client-id header. * </pre> * - * <code>TOO_MANY_REQUESTS = 18;</code> + * <code>CLIENT_ID_REQUIRED = 40017;</code> */ - TOO_MANY_REQUESTS(18), + CLIENT_ID_REQUIRED(40017), /** * <pre> - * Message property is not match the message type. + * Generic code indicates that the client request lacks valid authentication + * credentials for the requested resource. * </pre> * - * <code>MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 19;</code> + * <code>UNAUTHORIZED = 40100;</code> */ - MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE(19), + UNAUTHORIZED(40100), /** * <pre> - * Format of message id is illegal. + * Generic code for the case that user does not have the permission to operate. * </pre> * - * <code>ILLEGAL_MESSAGE_ID = 20;</code> + * <code>FORBIDDEN = 40300;</code> */ - ILLEGAL_MESSAGE_ID(20), + FORBIDDEN(40300), /** * <pre> - * Transaction id is invalid. + * Generic code for resource not found. * </pre> * - * <code>INVALID_TRANSACTION_ID = 21;</code> + * <code>NOT_FOUND = 40400;</code> */ - INVALID_TRANSACTION_ID(21), + NOT_FOUND(40400), /** * <pre> - * Format of filter expression is illegal. + * Message not found from server. * </pre> * - * <code>ILLEGAL_FILTER_EXPRESSION = 22;</code> + * <code>MESSAGE_NOT_FOUND = 40401;</code> */ - ILLEGAL_FILTER_EXPRESSION(22), + MESSAGE_NOT_FOUND(40401), /** * <pre> - * Receipt handle of message is invalid. + * Topic resource does not exist. * </pre> * - * <code>INVALID_RECEIPT_HANDLE = 23;</code> + * <code>TOPIC_NOT_FOUND = 40402;</code> */ - INVALID_RECEIPT_HANDLE(23), + TOPIC_NOT_FOUND(40402), /** * <pre> - * Message persistence timeout. + * Consumer group resource does not exist. * </pre> * - * <code>MASTER_PERSISTENCE_TIMEOUT = 24;</code> + * <code>CONSUMER_GROUP_NOT_FOUND = 40403;</code> */ - MASTER_PERSISTENCE_TIMEOUT(24), + CONSUMER_GROUP_NOT_FOUND(40403), /** * <pre> - * Slave persistence timeout. + * Generic code indicates that too many requests are made in short period of duration. + * Requests are throttled. * </pre> * - * <code>SLAVE_PERSISTENCE_TIMEOUT = 25;</code> + * <code>TOO_MANY_REQUESTS = 42900;</code> */ - SLAVE_PERSISTENCE_TIMEOUT(25), + TOO_MANY_REQUESTS(42900), /** * <pre> - * The HA-mechanism is not working now. + * Generic code indicates that server/client encountered an unexpected + * condition that prevented it from fulfilling the request. * </pre> * - * <code>HA_NOT_AVAILABLE = 26;</code> + * <code>INTERNAL_ERROR = 50000;</code> */ - HA_NOT_AVAILABLE(26), + INTERNAL_ERROR(50000), /** * <pre> - * Operation is not allowed in current version. + * Code indicates that the server encountered an unexpected condition + * that prevented it from fulfilling the request. + * This error response is a generic "catch-all" response. + * Usually, this indicates the server cannot find a better alternative + * error code to response. Sometimes, server administrators log error + * responses like the 500 status code with more details about the request + * to prevent the error from happening again in the future. + * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 * </pre> * - * <code>VERSION_UNSUPPORTED = 27;</code> + * <code>INTERNAL_SERVER_ERROR = 50001;</code> */ - VERSION_UNSUPPORTED(27), + INTERNAL_SERVER_ERROR(50001), /** * <pre> - * Message not found from server. + * The HA-mechanism is not working now. * </pre> * - * <code>MESSAGE_NOT_FOUND = 28;</code> + * <code>HA_NOT_AVAILABLE = 50002;</code> */ - MESSAGE_NOT_FOUND(28), + HA_NOT_AVAILABLE(50002), /** * <pre> - * Client type could not be recognized. + * Generic code means that the server or client does not support the + * functionality required to fulfill the request. * </pre> * - * <code>UNRECOGNIZED_CLIENT_TYPE = 29;</code> + * <code>NOT_IMPLEMENTED = 50100;</code> */ - UNRECOGNIZED_CLIENT_TYPE(29), + NOT_IMPLEMENTED(50100), /** * <pre> - * Return different results for entries in composite request. + * Generic code for timeout. * </pre> * - * <code>MULTIPLE_RESULTS = 30;</code> + * <code>TIMEOUT = 50400;</code> */ - MULTIPLE_RESULTS(30), + TIMEOUT(50400), /** * <pre> - * Generic code for bad request, indicating that required fields or headers are missing. + * Message persistence timeout. * </pre> * - * <code>BAD_REQUEST = 400;</code> + * <code>MASTER_PERSISTENCE_TIMEOUT = 50401;</code> */ - BAD_REQUEST(400), + MASTER_PERSISTENCE_TIMEOUT(50401), /** * <pre> - * Request is rejected due to missing of x-mq-client-id header. + * Slave persistence timeout. * </pre> * - * <code>BAD_REQUEST_CLIENT_ID = 400001;</code> + * <code>SLAVE_PERSISTENCE_TIMEOUT = 50402;</code> */ - BAD_REQUEST_CLIENT_ID(400001), + SLAVE_PERSISTENCE_TIMEOUT(50402), /** * <pre> - * Code indicates that the server encountered an unexpected condition - * that prevented it from fulfilling the request. - * This error response is a generic "catch-all" response. - * Usually, this indicates the server cannot find a better alternative - * error code to response. Sometimes, server administrators log error - * responses like the 500 status code with more details about the request - * to prevent the error from happening again in the future. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 + * Code indicates that the server, while acting as a gateway or proxy, + * did not get a response in time from the upstream server that + * it needed in order to complete the request. + * </pre> + * + * <code>PROXY_TIMEOUT = 50403;</code> + */ + PROXY_TIMEOUT(50403), + /** + * <code>UNSUPPORTED = 50500;</code> + */ + UNSUPPORTED(50500), + /** + * <pre> + * Operation is not allowed in current version. * </pre> * - * <code>INTERNAL_SERVER_ERROR = 500;</code> + * <code>VERSION_UNSUPPORTED = 50501;</code> */ - INTERNAL_SERVER_ERROR(500), + VERSION_UNSUPPORTED(50501), /** * <pre> - * Code means that the server or client does not support the functionality - * required to fulfill the request. + * Not allowed to verify message. Chances are that you are verifying + * a FIFO message, as is violating FIFO semantics. * </pre> * - * <code>NOT_IMPLEMENTED = 501;</code> + * <code>VERIFY_FIFO_MESSAGE_UNSUPPORTED = 50502;</code> */ - NOT_IMPLEMENTED(501), + VERIFY_FIFO_MESSAGE_UNSUPPORTED(50502), /** * <pre> - * Code indicates that the server, while acting as a gateway or proxy, - * did not get a response in time from the upstream server that - * it needed in order to complete the request. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504 + * Generic code for failed message consumption. * </pre> * - * <code>PROXY_TIMEOUT = 504;</code> + * <code>FAILED_TO_CONSUME_MESSAGE = 60000;</code> */ - PROXY_TIMEOUT(504), + FAILED_TO_CONSUME_MESSAGE(60000), UNRECOGNIZED(-1), ; + /** + * <code>CODE_UNSPECIFIED = 0;</code> + */ + public static final int CODE_UNSPECIFIED_VALUE = 0; /** * <pre> - * Success. + * Generic code for success. * </pre> * - * <code>OK = 0;</code> + * <code>OK = 20000;</code> */ - public static final int OK_VALUE = 0; + public static final int OK_VALUE = 20000; /** * <pre> - * Format of access point is illegal. + * Generic code for multiple return results. * </pre> * - * <code>ILLEGAL_ACCESS_POINT = 1;</code> + * <code>MULTIPLE_RESULTS = 30000;</code> */ - public static final int ILLEGAL_ACCESS_POINT_VALUE = 1; + public static final int MULTIPLE_RESULTS_VALUE = 30000; /** * <pre> - * Format of topic is illegal. + * Generic code for bad request, indicating that required fields or headers are missing. * </pre> * - * <code>ILLEGAL_TOPIC = 2;</code> + * <code>BAD_REQUEST = 40000;</code> */ - public static final int ILLEGAL_TOPIC_VALUE = 2; + public static final int BAD_REQUEST_VALUE = 40000; /** * <pre> - * Format of consumer group is illegal. + * Format of access point is illegal. * </pre> * - * <code>ILLEGAL_CONSUMER_GROUP = 3;</code> + * <code>ILLEGAL_ACCESS_POINT = 40001;</code> */ - public static final int ILLEGAL_CONSUMER_GROUP_VALUE = 3; + public static final int ILLEGAL_ACCESS_POINT_VALUE = 40001; /** * <pre> - * Format of message tag is illegal. + * Format of topic is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_TAG = 4;</code> + * <code>ILLEGAL_TOPIC = 40002;</code> */ - public static final int ILLEGAL_MESSAGE_TAG_VALUE = 4; + public static final int ILLEGAL_TOPIC_VALUE = 40002; /** * <pre> - * Format of message key is illegal. + * Format of consumer group is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_KEY = 5;</code> + * <code>ILLEGAL_CONSUMER_GROUP = 40003;</code> */ - public static final int ILLEGAL_MESSAGE_KEY_VALUE = 5; + public static final int ILLEGAL_CONSUMER_GROUP_VALUE = 40003; /** * <pre> - * Size of message keys exceeds the threshold. + * Format of message tag is illegal. + * </pre> + * + * <code>ILLEGAL_MESSAGE_TAG = 40004;</code> + */ + public static final int ILLEGAL_MESSAGE_TAG_VALUE = 40004; + /** + * <pre> + * Format of message key is illegal. * </pre> * - * <code>MESSAGE_KEYS_TOO_LARGE = 6;</code> + * <code>ILLEGAL_MESSAGE_KEY = 40005;</code> */ - public static final int MESSAGE_KEYS_TOO_LARGE_VALUE = 6; + public static final int ILLEGAL_MESSAGE_KEY_VALUE = 40005; /** * <pre> * Format of message group is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_GROUP = 7;</code> + * <code>ILLEGAL_MESSAGE_GROUP = 40006;</code> */ - public static final int ILLEGAL_MESSAGE_GROUP_VALUE = 7; + public static final int ILLEGAL_MESSAGE_GROUP_VALUE = 40006; /** * <pre> * Format of message property key is illegal. * </pre> * - * <code>ILLEGAL_MESSAGE_PROPERTY_KEY = 8;</code> + * <code>ILLEGAL_MESSAGE_PROPERTY_KEY = 40007;</code> */ - public static final int ILLEGAL_MESSAGE_PROPERTY_KEY_VALUE = 8; + public static final int ILLEGAL_MESSAGE_PROPERTY_KEY_VALUE = 40007; /** * <pre> * Message properties total size exceeds the threshold. * </pre> * - * <code>MESSAGE_PROPERTIES_TOO_LARGE = 9;</code> + * <code>MESSAGE_PROPERTIES_TOO_LARGE = 40008;</code> */ - public static final int MESSAGE_PROPERTIES_TOO_LARGE_VALUE = 9; + public static final int MESSAGE_PROPERTIES_TOO_LARGE_VALUE = 40008; /** * <pre> * Message body size exceeds the threshold. * </pre> * - * <code>MESSAGE_BODY_TOO_LARGE = 10;</code> + * <code>MESSAGE_BODY_TOO_LARGE = 40009;</code> */ - public static final int MESSAGE_BODY_TOO_LARGE_VALUE = 10; + public static final int MESSAGE_BODY_TOO_LARGE_VALUE = 40009; /** * <pre> - * User does not have the permission to operate. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403 + * Transaction id is invalid. * </pre> * - * <code>FORBIDDEN = 403;</code> + * <code>INVALID_TRANSACTION_ID = 40010;</code> */ - public static final int FORBIDDEN_VALUE = 403; + public static final int INVALID_TRANSACTION_ID_VALUE = 40010; /** * <pre> - * Code indicates that the client request has not been completed - * because it lacks valid authentication credentials for the - * requested resource. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 + * Format of message id is illegal. * </pre> * - * <code>UNAUTHORIZED = 401;</code> + * <code>ILLEGAL_MESSAGE_ID = 40011;</code> */ - public static final int UNAUTHORIZED_VALUE = 401; + public static final int ILLEGAL_MESSAGE_ID_VALUE = 40011; /** * <pre> - * Topic resource does not exist. + * Format of filter expression is illegal. * </pre> * - * <code>TOPIC_NOT_FOUND = 13;</code> + * <code>ILLEGAL_FILTER_EXPRESSION = 40012;</code> */ - public static final int TOPIC_NOT_FOUND_VALUE = 13; + public static final int ILLEGAL_FILTER_EXPRESSION_VALUE = 40012; /** * <pre> - * Consumer group resource does not exist. + * Receipt handle of message is invalid. * </pre> * - * <code>CONSUMER_GROUP_NOT_FOUND = 14;</code> + * <code>INVALID_RECEIPT_HANDLE = 40013;</code> */ - public static final int CONSUMER_GROUP_NOT_FOUND_VALUE = 14; + public static final int INVALID_RECEIPT_HANDLE_VALUE = 40013; /** * <pre> - * Not allowed to verify message. Chances are that you are verifying - * a FIFO message, as is violating FIFO semantics. + * Message property is not match the message type. * </pre> * - * <code>VERIFY_MESSAGE_FORBIDDEN = 15;</code> + * <code>MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 40014;</code> */ - public static final int VERIFY_MESSAGE_FORBIDDEN_VALUE = 15; + public static final int MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE_VALUE = 40014; /** * <pre> - * Failed to consume message. + * Client type could not be recognized. * </pre> * - * <code>FAILED_TO_CONSUME_MESSAGE = 16;</code> + * <code>UNRECOGNIZED_CLIENT_TYPE = 40015;</code> */ - public static final int FAILED_TO_CONSUME_MESSAGE_VALUE = 16; + public static final int UNRECOGNIZED_CLIENT_TYPE_VALUE = 40015; /** * <pre> * Message is corrupted. * </pre> * - * <code>MESSAGE_CORRUPTED = 17;</code> + * <code>MESSAGE_CORRUPTED = 40016;</code> */ - public static final int MESSAGE_CORRUPTED_VALUE = 17; + public static final int MESSAGE_CORRUPTED_VALUE = 40016; /** * <pre> - * Too many requests are made in short period of duration. - * Requests are throttled. + * Request is rejected due to missing of x-mq-client-id header. * </pre> * - * <code>TOO_MANY_REQUESTS = 18;</code> + * <code>CLIENT_ID_REQUIRED = 40017;</code> */ - public static final int TOO_MANY_REQUESTS_VALUE = 18; + public static final int CLIENT_ID_REQUIRED_VALUE = 40017; /** * <pre> - * Message property is not match the message type. + * Generic code indicates that the client request lacks valid authentication + * credentials for the requested resource. * </pre> * - * <code>MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 19;</code> + * <code>UNAUTHORIZED = 40100;</code> */ - public static final int MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE_VALUE = 19; + public static final int UNAUTHORIZED_VALUE = 40100; /** * <pre> - * Format of message id is illegal. + * Generic code for the case that user does not have the permission to operate. * </pre> * - * <code>ILLEGAL_MESSAGE_ID = 20;</code> + * <code>FORBIDDEN = 40300;</code> */ - public static final int ILLEGAL_MESSAGE_ID_VALUE = 20; + public static final int FORBIDDEN_VALUE = 40300; /** * <pre> - * Transaction id is invalid. + * Generic code for resource not found. * </pre> * - * <code>INVALID_TRANSACTION_ID = 21;</code> + * <code>NOT_FOUND = 40400;</code> */ - public static final int INVALID_TRANSACTION_ID_VALUE = 21; + public static final int NOT_FOUND_VALUE = 40400; /** * <pre> - * Format of filter expression is illegal. + * Message not found from server. * </pre> * - * <code>ILLEGAL_FILTER_EXPRESSION = 22;</code> + * <code>MESSAGE_NOT_FOUND = 40401;</code> */ - public static final int ILLEGAL_FILTER_EXPRESSION_VALUE = 22; + public static final int MESSAGE_NOT_FOUND_VALUE = 40401; /** * <pre> - * Receipt handle of message is invalid. + * Topic resource does not exist. * </pre> * - * <code>INVALID_RECEIPT_HANDLE = 23;</code> + * <code>TOPIC_NOT_FOUND = 40402;</code> */ - public static final int INVALID_RECEIPT_HANDLE_VALUE = 23; + public static final int TOPIC_NOT_FOUND_VALUE = 40402; /** * <pre> - * Message persistence timeout. + * Consumer group resource does not exist. * </pre> * - * <code>MASTER_PERSISTENCE_TIMEOUT = 24;</code> + * <code>CONSUMER_GROUP_NOT_FOUND = 40403;</code> */ - public static final int MASTER_PERSISTENCE_TIMEOUT_VALUE = 24; + public static final int CONSUMER_GROUP_NOT_FOUND_VALUE = 40403; /** * <pre> - * Slave persistence timeout. + * Generic code indicates that too many requests are made in short period of duration. + * Requests are throttled. * </pre> * - * <code>SLAVE_PERSISTENCE_TIMEOUT = 25;</code> + * <code>TOO_MANY_REQUESTS = 42900;</code> */ - public static final int SLAVE_PERSISTENCE_TIMEOUT_VALUE = 25; + public static final int TOO_MANY_REQUESTS_VALUE = 42900; /** * <pre> - * The HA-mechanism is not working now. + * Generic code indicates that server/client encountered an unexpected + * condition that prevented it from fulfilling the request. * </pre> * - * <code>HA_NOT_AVAILABLE = 26;</code> + * <code>INTERNAL_ERROR = 50000;</code> */ - public static final int HA_NOT_AVAILABLE_VALUE = 26; + public static final int INTERNAL_ERROR_VALUE = 50000; /** * <pre> - * Operation is not allowed in current version. + * Code indicates that the server encountered an unexpected condition + * that prevented it from fulfilling the request. + * This error response is a generic "catch-all" response. + * Usually, this indicates the server cannot find a better alternative + * error code to response. Sometimes, server administrators log error + * responses like the 500 status code with more details about the request + * to prevent the error from happening again in the future. + * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 * </pre> * - * <code>VERSION_UNSUPPORTED = 27;</code> + * <code>INTERNAL_SERVER_ERROR = 50001;</code> */ - public static final int VERSION_UNSUPPORTED_VALUE = 27; + public static final int INTERNAL_SERVER_ERROR_VALUE = 50001; /** * <pre> - * Message not found from server. + * The HA-mechanism is not working now. * </pre> * - * <code>MESSAGE_NOT_FOUND = 28;</code> + * <code>HA_NOT_AVAILABLE = 50002;</code> */ - public static final int MESSAGE_NOT_FOUND_VALUE = 28; + public static final int HA_NOT_AVAILABLE_VALUE = 50002; /** * <pre> - * Client type could not be recognized. + * Generic code means that the server or client does not support the + * functionality required to fulfill the request. * </pre> * - * <code>UNRECOGNIZED_CLIENT_TYPE = 29;</code> + * <code>NOT_IMPLEMENTED = 50100;</code> */ - public static final int UNRECOGNIZED_CLIENT_TYPE_VALUE = 29; + public static final int NOT_IMPLEMENTED_VALUE = 50100; /** * <pre> - * Return different results for entries in composite request. + * Generic code for timeout. * </pre> * - * <code>MULTIPLE_RESULTS = 30;</code> + * <code>TIMEOUT = 50400;</code> */ - public static final int MULTIPLE_RESULTS_VALUE = 30; + public static final int TIMEOUT_VALUE = 50400; /** * <pre> - * Generic code for bad request, indicating that required fields or headers are missing. + * Message persistence timeout. * </pre> * - * <code>BAD_REQUEST = 400;</code> + * <code>MASTER_PERSISTENCE_TIMEOUT = 50401;</code> */ - public static final int BAD_REQUEST_VALUE = 400; + public static final int MASTER_PERSISTENCE_TIMEOUT_VALUE = 50401; /** * <pre> - * Request is rejected due to missing of x-mq-client-id header. + * Slave persistence timeout. * </pre> * - * <code>BAD_REQUEST_CLIENT_ID = 400001;</code> + * <code>SLAVE_PERSISTENCE_TIMEOUT = 50402;</code> */ - public static final int BAD_REQUEST_CLIENT_ID_VALUE = 400001; + public static final int SLAVE_PERSISTENCE_TIMEOUT_VALUE = 50402; /** * <pre> - * Code indicates that the server encountered an unexpected condition - * that prevented it from fulfilling the request. - * This error response is a generic "catch-all" response. - * Usually, this indicates the server cannot find a better alternative - * error code to response. Sometimes, server administrators log error - * responses like the 500 status code with more details about the request - * to prevent the error from happening again in the future. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 + * Code indicates that the server, while acting as a gateway or proxy, + * did not get a response in time from the upstream server that + * it needed in order to complete the request. + * </pre> + * + * <code>PROXY_TIMEOUT = 50403;</code> + */ + public static final int PROXY_TIMEOUT_VALUE = 50403; + /** + * <code>UNSUPPORTED = 50500;</code> + */ + public static final int UNSUPPORTED_VALUE = 50500; + /** + * <pre> + * Operation is not allowed in current version. * </pre> * - * <code>INTERNAL_SERVER_ERROR = 500;</code> + * <code>VERSION_UNSUPPORTED = 50501;</code> */ - public static final int INTERNAL_SERVER_ERROR_VALUE = 500; + public static final int VERSION_UNSUPPORTED_VALUE = 50501; /** * <pre> - * Code means that the server or client does not support the functionality - * required to fulfill the request. + * Not allowed to verify message. Chances are that you are verifying + * a FIFO message, as is violating FIFO semantics. * </pre> * - * <code>NOT_IMPLEMENTED = 501;</code> + * <code>VERIFY_FIFO_MESSAGE_UNSUPPORTED = 50502;</code> */ - public static final int NOT_IMPLEMENTED_VALUE = 501; + public static final int VERIFY_FIFO_MESSAGE_UNSUPPORTED_VALUE = 50502; /** * <pre> - * Code indicates that the server, while acting as a gateway or proxy, - * did not get a response in time from the upstream server that - * it needed in order to complete the request. - * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504 + * Generic code for failed message consumption. * </pre> * - * <code>PROXY_TIMEOUT = 504;</code> + * <code>FAILED_TO_CONSUME_MESSAGE = 60000;</code> */ - public static final int PROXY_TIMEOUT_VALUE = 504; + public static final int FAILED_TO_CONSUME_MESSAGE_VALUE = 60000; public final int getNumber() { @@ -647,42 +689,46 @@ public enum Code */ public static Code forNumber(int value) { switch (value) { - case 0: return OK; - case 1: return ILLEGAL_ACCESS_POINT; - case 2: return ILLEGAL_TOPIC; - case 3: return ILLEGAL_CONSUMER_GROUP; - case 4: return ILLEGAL_MESSAGE_TAG; - case 5: return ILLEGAL_MESSAGE_KEY; - case 6: return MESSAGE_KEYS_TOO_LARGE; - case 7: return ILLEGAL_MESSAGE_GROUP; - case 8: return ILLEGAL_MESSAGE_PROPERTY_KEY; - case 9: return MESSAGE_PROPERTIES_TOO_LARGE; - case 10: return MESSAGE_BODY_TOO_LARGE; - case 403: return FORBIDDEN; - case 401: return UNAUTHORIZED; - case 13: return TOPIC_NOT_FOUND; - case 14: return CONSUMER_GROUP_NOT_FOUND; - case 15: return VERIFY_MESSAGE_FORBIDDEN; - case 16: return FAILED_TO_CONSUME_MESSAGE; - case 17: return MESSAGE_CORRUPTED; - case 18: return TOO_MANY_REQUESTS; - case 19: return MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE; - case 20: return ILLEGAL_MESSAGE_ID; - case 21: return INVALID_TRANSACTION_ID; - case 22: return ILLEGAL_FILTER_EXPRESSION; - case 23: return INVALID_RECEIPT_HANDLE; - case 24: return MASTER_PERSISTENCE_TIMEOUT; - case 25: return SLAVE_PERSISTENCE_TIMEOUT; - case 26: return HA_NOT_AVAILABLE; - case 27: return VERSION_UNSUPPORTED; - case 28: return MESSAGE_NOT_FOUND; - case 29: return UNRECOGNIZED_CLIENT_TYPE; - case 30: return MULTIPLE_RESULTS; - case 400: return BAD_REQUEST; - case 400001: return BAD_REQUEST_CLIENT_ID; - case 500: return INTERNAL_SERVER_ERROR; - case 501: return NOT_IMPLEMENTED; - case 504: return PROXY_TIMEOUT; + case 0: return CODE_UNSPECIFIED; + case 20000: return OK; + case 30000: return MULTIPLE_RESULTS; + case 40000: return BAD_REQUEST; + case 40001: return ILLEGAL_ACCESS_POINT; + case 40002: return ILLEGAL_TOPIC; + case 40003: return ILLEGAL_CONSUMER_GROUP; + case 40004: return ILLEGAL_MESSAGE_TAG; + case 40005: return ILLEGAL_MESSAGE_KEY; + case 40006: return ILLEGAL_MESSAGE_GROUP; + case 40007: return ILLEGAL_MESSAGE_PROPERTY_KEY; + case 40008: return MESSAGE_PROPERTIES_TOO_LARGE; + case 40009: return MESSAGE_BODY_TOO_LARGE; + case 40010: return INVALID_TRANSACTION_ID; + case 40011: return ILLEGAL_MESSAGE_ID; + case 40012: return ILLEGAL_FILTER_EXPRESSION; + case 40013: return INVALID_RECEIPT_HANDLE; + case 40014: return MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE; + case 40015: return UNRECOGNIZED_CLIENT_TYPE; + case 40016: return MESSAGE_CORRUPTED; + case 40017: return CLIENT_ID_REQUIRED; + case 40100: return UNAUTHORIZED; + case 40300: return FORBIDDEN; + case 40400: return NOT_FOUND; + case 40401: return MESSAGE_NOT_FOUND; + case 40402: return TOPIC_NOT_FOUND; + case 40403: return CONSUMER_GROUP_NOT_FOUND; + case 42900: return TOO_MANY_REQUESTS; + case 50000: return INTERNAL_ERROR; + case 50001: return INTERNAL_SERVER_ERROR; + case 50002: return HA_NOT_AVAILABLE; + case 50100: return NOT_IMPLEMENTED; + case 50400: return TIMEOUT; + case 50401: return MASTER_PERSISTENCE_TIMEOUT; + case 50402: return SLAVE_PERSISTENCE_TIMEOUT; + case 50403: return PROXY_TIMEOUT; + case 50500: return UNSUPPORTED; + case 50501: return VERSION_UNSUPPORTED; + case 50502: return VERIFY_FIFO_MESSAGE_UNSUPPORTED; + case 60000: return FAILED_TO_CONSUME_MESSAGE; default: return null; } } diff --git a/src/main/java/apache/rocketmq/v2/MQDomain.java b/src/main/java/apache/rocketmq/v2/MQDomain.java index 4d185b8..54c75c2 100644 --- a/src/main/java/apache/rocketmq/v2/MQDomain.java +++ b/src/main/java/apache/rocketmq/v2/MQDomain.java @@ -195,35 +195,38 @@ public final class MQDomain { "entType\022\033\n\027CLIENT_TYPE_UNSPECIFIED\020\000\022\014\n\010" + "PRODUCER\020\001\022\021\n\rPUSH_CONSUMER\020\002\022\023\n\017SIMPLE_" + "CONSUMER\020\003*<\n\010Encoding\022\030\n\024ENCODING_UNSPE" + - "CIFIED\020\000\022\014\n\010IDENTITY\020\001\022\010\n\004GZIP\020\002*\260\007\n\004Cod" + - "e\022\006\n\002OK\020\000\022\030\n\024ILLEGAL_ACCESS_POINT\020\001\022\021\n\rI" + - "LLEGAL_TOPIC\020\002\022\032\n\026ILLEGAL_CONSUMER_GROUP" + - "\020\003\022\027\n\023ILLEGAL_MESSAGE_TAG\020\004\022\027\n\023ILLEGAL_M" + - "ESSAGE_KEY\020\005\022\032\n\026MESSAGE_KEYS_TOO_LARGE\020\006" + - "\022\031\n\025ILLEGAL_MESSAGE_GROUP\020\007\022 \n\034ILLEGAL_M" + - "ESSAGE_PROPERTY_KEY\020\010\022 \n\034MESSAGE_PROPERT" + - "IES_TOO_LARGE\020\t\022\032\n\026MESSAGE_BODY_TOO_LARG" + - "E\020\n\022\016\n\tFORBIDDEN\020\223\003\022\021\n\014UNAUTHORIZED\020\221\003\022\023" + - "\n\017TOPIC_NOT_FOUND\020\r\022\034\n\030CONSUMER_GROUP_NO" + - "T_FOUND\020\016\022\034\n\030VERIFY_MESSAGE_FORBIDDEN\020\017\022" + - "\035\n\031FAILED_TO_CONSUME_MESSAGE\020\020\022\025\n\021MESSAG" + - "E_CORRUPTED\020\021\022\025\n\021TOO_MANY_REQUESTS\020\022\0220\n," + - "MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_" + - "TYPE\020\023\022\026\n\022ILLEGAL_MESSAGE_ID\020\024\022\032\n\026INVALI" + - "D_TRANSACTION_ID\020\025\022\035\n\031ILLEGAL_FILTER_EXP" + - "RESSION\020\026\022\032\n\026INVALID_RECEIPT_HANDLE\020\027\022\036\n" + - "\032MASTER_PERSISTENCE_TIMEOUT\020\030\022\035\n\031SLAVE_P" + - "ERSISTENCE_TIMEOUT\020\031\022\024\n\020HA_NOT_AVAILABLE" + - "\020\032\022\027\n\023VERSION_UNSUPPORTED\020\033\022\025\n\021MESSAGE_N" + - "OT_FOUND\020\034\022\034\n\030UNRECOGNIZED_CLIENT_TYPE\020\035" + - "\022\024\n\020MULTIPLE_RESULTS\020\036\022\020\n\013BAD_REQUEST\020\220\003" + - "\022\033\n\025BAD_REQUEST_CLIENT_ID\020\201\265\030\022\032\n\025INTERNA" + - "L_SERVER_ERROR\020\364\003\022\024\n\017NOT_IMPLEMENTED\020\365\003\022" + - "\022\n\rPROXY_TIMEOUT\020\370\003*Z\n\010Language\022\030\n\024LANGU" + - "AGE_UNSPECIFIED\020\000\022\010\n\004JAVA\020\001\022\007\n\003CPP\020\002\022\013\n\007" + - "DOT_NET\020\003\022\n\n\006GOLANG\020\004\022\010\n\004RUST\020\005B;\n\022apach" + - "e.rocketmq.v2B\010MQDomainP\001\240\001\001\330\001\001\252\002\022Apache" + - ".Rocketmq.V2b\006proto3" + "CIFIED\020\000\022\014\n\010IDENTITY\020\001\022\010\n\004GZIP\020\002*\265\010\n\004Cod" + + "e\022\024\n\020CODE_UNSPECIFIED\020\000\022\010\n\002OK\020\240\234\001\022\026\n\020MUL" + + "TIPLE_RESULTS\020\260\352\001\022\021\n\013BAD_REQUEST\020\300\270\002\022\032\n\024" + + "ILLEGAL_ACCESS_POINT\020\301\270\002\022\023\n\rILLEGAL_TOPI" + + "C\020\302\270\002\022\034\n\026ILLEGAL_CONSUMER_GROUP\020\303\270\002\022\031\n\023I" + + "LLEGAL_MESSAGE_TAG\020\304\270\002\022\031\n\023ILLEGAL_MESSAG" + + "E_KEY\020\305\270\002\022\033\n\025ILLEGAL_MESSAGE_GROUP\020\306\270\002\022\"" + + "\n\034ILLEGAL_MESSAGE_PROPERTY_KEY\020\307\270\002\022\"\n\034ME" + + "SSAGE_PROPERTIES_TOO_LARGE\020\310\270\002\022\034\n\026MESSAG" + + "E_BODY_TOO_LARGE\020\311\270\002\022\034\n\026INVALID_TRANSACT" + + "ION_ID\020\312\270\002\022\030\n\022ILLEGAL_MESSAGE_ID\020\313\270\002\022\037\n\031" + + "ILLEGAL_FILTER_EXPRESSION\020\314\270\002\022\034\n\026INVALID" + + "_RECEIPT_HANDLE\020\315\270\002\0222\n,MESSAGE_PROPERTY_" + + "DOES_NOT_MATCH_MESSAGE_TYPE\020\316\270\002\022\036\n\030UNREC" + + "OGNIZED_CLIENT_TYPE\020\317\270\002\022\027\n\021MESSAGE_CORRU" + + "PTED\020\320\270\002\022\030\n\022CLIENT_ID_REQUIRED\020\321\270\002\022\022\n\014UN" + + "AUTHORIZED\020\244\271\002\022\017\n\tFORBIDDEN\020\354\272\002\022\017\n\tNOT_F" + + "OUND\020\320\273\002\022\027\n\021MESSAGE_NOT_FOUND\020\321\273\002\022\025\n\017TOP" + + "IC_NOT_FOUND\020\322\273\002\022\036\n\030CONSUMER_GROUP_NOT_F" + + "OUND\020\323\273\002\022\027\n\021TOO_MANY_REQUESTS\020\224\317\002\022\024\n\016INT" + + "ERNAL_ERROR\020\320\206\003\022\033\n\025INTERNAL_SERVER_ERROR" + + "\020\321\206\003\022\026\n\020HA_NOT_AVAILABLE\020\322\206\003\022\025\n\017NOT_IMPL" + + "EMENTED\020\264\207\003\022\r\n\007TIMEOUT\020\340\211\003\022 \n\032MASTER_PER" + + "SISTENCE_TIMEOUT\020\341\211\003\022\037\n\031SLAVE_PERSISTENC" + + "E_TIMEOUT\020\342\211\003\022\023\n\rPROXY_TIMEOUT\020\343\211\003\022\021\n\013UN" + + "SUPPORTED\020\304\212\003\022\031\n\023VERSION_UNSUPPORTED\020\305\212\003" + + "\022%\n\037VERIFY_FIFO_MESSAGE_UNSUPPORTED\020\306\212\003\022" + + "\037\n\031FAILED_TO_CONSUME_MESSAGE\020\340\324\003*Z\n\010Lang" + + "uage\022\030\n\024LANGUAGE_UNSPECIFIED\020\000\022\010\n\004JAVA\020\001" + + "\022\007\n\003CPP\020\002\022\013\n\007DOT_NET\020\003\022\n\n\006GOLANG\020\004\022\010\n\004RU" + + "ST\020\005B;\n\022apache.rocketmq.v2B\010MQDomainP\001\240\001" + + "\001\330\001\001\252\002\022Apache.Rocketmq.V2b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, diff --git a/src/main/java/apache/rocketmq/v2/Status.java b/src/main/java/apache/rocketmq/v2/Status.java index 892c81e..598a3ff 100644 --- a/src/main/java/apache/rocketmq/v2/Status.java +++ b/src/main/java/apache/rocketmq/v2/Status.java @@ -165,7 +165,7 @@ private static final long serialVersionUID = 0L; @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (code_ != apache.rocketmq.v2.Code.OK.getNumber()) { + if (code_ != apache.rocketmq.v2.Code.CODE_UNSPECIFIED.getNumber()) { output.writeEnum(1, code_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(message_)) { @@ -180,7 +180,7 @@ private static final long serialVersionUID = 0L; if (size != -1) return size; size = 0; - if (code_ != apache.rocketmq.v2.Code.OK.getNumber()) { + if (code_ != apache.rocketmq.v2.Code.CODE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, code_); } diff --git a/src/main/resources/proto/apache/rocketmq/v2/definition.proto b/src/main/resources/proto/apache/rocketmq/v2/definition.proto index 705d4ee..71dc72b 100644 --- a/src/main/resources/proto/apache/rocketmq/v2/definition.proto +++ b/src/main/resources/proto/apache/rocketmq/v2/definition.proto @@ -288,104 +288,79 @@ message Message { bytes body = 4; } -message Assignment { MessageQueue message_queue = 1; } +message Assignment { + MessageQueue message_queue = 1; +} enum Code { - // Success. - OK = 0; + CODE_UNSPECIFIED = 0; + + // Generic code for success. + OK = 20000; + + // Generic code for multiple return results. + MULTIPLE_RESULTS = 30000; + + // Generic code for bad request, indicating that required fields or headers are missing. + BAD_REQUEST = 40000; // Format of access point is illegal. - ILLEGAL_ACCESS_POINT = 1; + ILLEGAL_ACCESS_POINT = 40001; // Format of topic is illegal. - ILLEGAL_TOPIC = 2; + ILLEGAL_TOPIC = 40002; // Format of consumer group is illegal. - ILLEGAL_CONSUMER_GROUP = 3; + ILLEGAL_CONSUMER_GROUP = 40003; // Format of message tag is illegal. - ILLEGAL_MESSAGE_TAG = 4; + ILLEGAL_MESSAGE_TAG = 40004; // Format of message key is illegal. - ILLEGAL_MESSAGE_KEY = 5; - // Size of message keys exceeds the threshold. - MESSAGE_KEYS_TOO_LARGE = 6; + ILLEGAL_MESSAGE_KEY = 40005; // Format of message group is illegal. - ILLEGAL_MESSAGE_GROUP = 7; + ILLEGAL_MESSAGE_GROUP = 40006; // Format of message property key is illegal. - ILLEGAL_MESSAGE_PROPERTY_KEY = 8; + ILLEGAL_MESSAGE_PROPERTY_KEY = 40007; // Message properties total size exceeds the threshold. - MESSAGE_PROPERTIES_TOO_LARGE = 9; + MESSAGE_PROPERTIES_TOO_LARGE = 40008; // Message body size exceeds the threshold. - MESSAGE_BODY_TOO_LARGE = 10; - - // User does not have the permission to operate. - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403 - FORBIDDEN = 403; - - // Code indicates that the client request has not been completed - // because it lacks valid authentication credentials for the - // requested resource. - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401 - UNAUTHORIZED = 401; - - // Topic resource does not exist. - TOPIC_NOT_FOUND = 13; - - // Consumer group resource does not exist. - CONSUMER_GROUP_NOT_FOUND = 14; - - // Not allowed to verify message. Chances are that you are verifying - // a FIFO message, as is violating FIFO semantics. - VERIFY_MESSAGE_FORBIDDEN = 15; - - // Failed to consume message. - FAILED_TO_CONSUME_MESSAGE = 16; - - // Message is corrupted. - MESSAGE_CORRUPTED = 17; - - // Too many requests are made in short period of duration. - // Requests are throttled. - TOO_MANY_REQUESTS = 18; - - // Message property is not match the message type. - MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 19; - - // Format of message id is illegal. - ILLEGAL_MESSAGE_ID = 20; - + MESSAGE_BODY_TOO_LARGE = 40009; // Transaction id is invalid. - INVALID_TRANSACTION_ID = 21; - + INVALID_TRANSACTION_ID = 40010; + // Format of message id is illegal. + ILLEGAL_MESSAGE_ID = 40011; // Format of filter expression is illegal. - ILLEGAL_FILTER_EXPRESSION = 22; - + ILLEGAL_FILTER_EXPRESSION = 40012; // Receipt handle of message is invalid. - INVALID_RECEIPT_HANDLE = 23; - - // Message persistence timeout. - MASTER_PERSISTENCE_TIMEOUT = 24; - - // Slave persistence timeout. - SLAVE_PERSISTENCE_TIMEOUT = 25; + INVALID_RECEIPT_HANDLE = 40013; + // Message property is not match the message type. + MESSAGE_PROPERTY_DOES_NOT_MATCH_MESSAGE_TYPE = 40014; + // Client type could not be recognized. + UNRECOGNIZED_CLIENT_TYPE = 40015; + // Message is corrupted. + MESSAGE_CORRUPTED = 40016; + // Request is rejected due to missing of x-mq-client-id header. + CLIENT_ID_REQUIRED = 40017; - // The HA-mechanism is not working now. - HA_NOT_AVAILABLE = 26; + // Generic code indicates that the client request lacks valid authentication + // credentials for the requested resource. + UNAUTHORIZED = 40100; - // Operation is not allowed in current version. - VERSION_UNSUPPORTED = 27; + // Generic code for the case that user does not have the permission to operate. + FORBIDDEN = 40300; + // Generic code for resource not found. + NOT_FOUND = 40400; // Message not found from server. - MESSAGE_NOT_FOUND = 28; - - // Client type could not be recognized. - UNRECOGNIZED_CLIENT_TYPE = 29; - - // Return different results for entries in composite request. - MULTIPLE_RESULTS = 30; - - // Generic code for bad request, indicating that required fields or headers are missing. - BAD_REQUEST = 400; + MESSAGE_NOT_FOUND = 40401; + // Topic resource does not exist. + TOPIC_NOT_FOUND = 40402; + // Consumer group resource does not exist. + CONSUMER_GROUP_NOT_FOUND = 40403; - // Request is rejected due to missing of x-mq-client-id header. - BAD_REQUEST_CLIENT_ID = 400001; + // Generic code indicates that too many requests are made in short period of duration. + // Requests are throttled. + TOO_MANY_REQUESTS = 42900; + // Generic code indicates that server/client encountered an unexpected + // condition that prevented it from fulfilling the request. + INTERNAL_ERROR = 50000; // Code indicates that the server encountered an unexpected condition // that prevented it from fulfilling the request. // This error response is a generic "catch-all" response. @@ -395,17 +370,34 @@ enum Code { // to prevent the error from happening again in the future. // // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500 - INTERNAL_SERVER_ERROR = 500; + INTERNAL_SERVER_ERROR = 50001; + // The HA-mechanism is not working now. + HA_NOT_AVAILABLE = 50002; - // Code means that the server or client does not support the functionality - // required to fulfill the request. - NOT_IMPLEMENTED = 501; + // Generic code means that the server or client does not support the + // functionality required to fulfill the request. + NOT_IMPLEMENTED = 50100; + // Generic code for timeout. + TIMEOUT = 50400; + // Message persistence timeout. + MASTER_PERSISTENCE_TIMEOUT = 50401; + // Slave persistence timeout. + SLAVE_PERSISTENCE_TIMEOUT = 50402; // Code indicates that the server, while acting as a gateway or proxy, // did not get a response in time from the upstream server that // it needed in order to complete the request. - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504 - PROXY_TIMEOUT = 504; + PROXY_TIMEOUT = 50403; + + UNSUPPORTED = 50500; + // Operation is not allowed in current version. + VERSION_UNSUPPORTED = 50501; + // Not allowed to verify message. Chances are that you are verifying + // a FIFO message, as is violating FIFO semantics. + VERIFY_FIFO_MESSAGE_UNSUPPORTED = 50502; + + // Generic code for failed message consumption. + FAILED_TO_CONSUME_MESSAGE = 60000; } message Status {
