Release protocol v2 (#42)

* Upgrade version to 2.0

* Use stream telemetry and receive message response

* Remove unused messages

* Allow send batched messages

* Use plural forms for repeated fields

* Remove Nack API

* Move FIFO flag to ConsumerData

* Format

* Add change proposal

* Minor fix

* WIP: settings

* Revert ReceiveMessage RPC to unary type

* Remove HealthCheck unary RPC

* Refactor the response common (#15)

* Refactor the response common

* Update CI config

* Fix typo

* Rename some of the code

* Add 500 Internal Server Error

* Change code field name

* Add gateway timeout error code

* Add not-impelement code

* Fix typo

* Fix a series of issues (#16)

* Supply more code in status (#19)

* Add code: illegal message (#20)

* Add code: illegal message

* Remove redundant fields

* Support batch ack

* Support batch ack of messages

* Refactor client settings (#21)

* Remove unused RPCs and introduce server side stream to mitigate performance issue

* Add RPC-level status field

* Typo fix

* Refactor telemetry settings (#22)

* Add documents

* Add clang-format to format proto files

* Remove message_queue from SendMessageRequest

* Polish code (#23)

* Support customized backoff duration for cases of sending throttle or message consumption failure

* Add more comments for ReceiveMessageResponse (#24)

* Remove repeated support of messages in ReceiveMessageResponse as it is targeted use case is stream

* Simplify ReceiveMessageResponse struct

* Optimize exponential backoff

* Externalize backoff configuration for retries

* [ISSUE #26] Make interface orthogonal

* Add message_id in ChangeInvisibleDurationRequest for tracing

* Add optional for RetryPolicy

* Add message queue in RecoverOrphanedTransactionCommand (#29)

* Remove NackMessage (#28)

* [ISSUE #26] Add ClientType in HeartbeatRequest (#30)

* Include user agent details in settings

* Add status for TelemetryCommand

* remove status in ThreadStackTrace and VerifyMessageResult (#35)

* Add message_queue for VerifyMessageCommand (#36)

* Allow partial batch-send-failure in protocol perspsective

* Add status code: multiple results (#37)

* Add metric endpoints (#38)

* Rename field name of metrics collector endpoints

* Add response_delivery_time for ReceiveMessageResponse (#40)

* Fix typo (#41)

* Fix grammar issue and import

Co-authored-by: Aaron Ai <yangkun.ayk@alibaba-inc.com>
Co-authored-by: zhouxiang <zhouxiang.zzx@alibaba-inc.com>
Co-authored-by: lk <xdkxlk@outlook.com>
16 files changed
tree: 1e82809afce24e27bf053b052c07c66029e2f44f
  1. .github/
  2. apache/
  3. cpp/
  4. java/
  5. .asf.yaml
  6. .bazelrc
  7. .bazelversion
  8. .clang-format
  9. .gitignore
  10. BUILD.bazel
  11. ChangeLog.md
  12. compile.bzl
  13. deps.bzl
  14. plugin.bzl
  15. README.md
  16. StyleGuide.md
  17. WORKSPACE
README.md

Overview

Extension Spec

Message Model

Producer Flow

Consumer Flow

Error handling

This API spec adopts a rich error model developed by Google as described here. This model enables servers to return and clients to consume additional error details expressed as one or more protobuf messages. It further specifies a standard set of error message types to cover the most common needs (such as invalid parameters, quota violations, and stack traces).

The whole set of response codes are listed here, except the offical gRPC error model, please refer to service.proto for more details about the error responses of each RPC service.

Reserved Fields

Messages and enumerations of the API spec reserve the first 64 fields for the evolution of RocketMQ exclusively. Vendor-specific extensions to the protocol are supposed to use fields beyond 64.