All Products
Search
Document Center

ApsaraMQ for RocketMQ:Major version upgrade for TCP client SDKs

更新時間:Dec 20, 2023

ApsaraMQ for RocketMQ released new versions of the TCP client SDK for Java and the TCP client SDK for C++ on October 18, 2021. In this release, the major versions of the TCP client SDKs are upgraded. This topic describes the SDK version information, the regions that support the upgrade, and the feature changes.

SDK version information

The following table describes the information about the upgraded SDK versions.

Protocol

Programming language

Version number

TCP

Java

V2.x.x.Final

C++

V3.x.x

Usage notes

Supported regions

  • You can upgrade the TCP client SDK for Java to V2.x.x.Final only in the following regions: China (Hangzhou), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Chengdu), China (Hong Kong), Germany (Frankfurt), and Indonesia (Jakarta).

    Important

    To ensure that you can use the TCP client SDK for Java to connect to ApsaraMQ for RocketMQ, do not upgrade your TCP client SDK for Java to V2.x.x.Final in other regions.

  • The TCP client SDK for C++ V3.x.x is available in all regions.

Supported networks

  • TCP client SDK for Java V2.x.x.Final: allows you to access ApsaraMQ for RocketMQ only in virtual private clouds (VPCs).

    Important

    If you use an existing ApsaraMQ for RocketMQ instance and access the instance over the classic network, do not upgrade your TCP client SDK for Java to V2.x.x.Final. Otherwise, you cannot access the ApsaraMQ for RocketMQ instance.

  • TCP client SDK for C++ V3.x.x: No limit is imposed on networks.

Limits on namespaces

  • TCP client SDK for Java V2.x.x.Final: supports only instances that contain namespaces. If you use an instance that does not contain a namespace, do not upgrade your TCP client SDK for Java to V2.x.x.Final.

  • TCP client SDK for C++ V3.x.x: supports only instances that contain namespaces. If you use an instance that does not contain a namespace, do not upgrade your TCP client SDK for Java to V3.x.x.

Note

By default, all Message Queue for Apache RocketMQ 5.x instances contain namespaces. To view whether a Message Queue for Apache RocketMQ 4.x instance contains a namespace, go to the Basic Information section of the Instance Details page in the ApsaraMQ for RocketMQ console.

Feature changes

The following table describes the differences between the supported features before and after you upgrade the major version of your TCP client SDK.

Feature

Version before upgrade

SDK for Java: V1.x.x.Final

SDK for C++: V2.x.x or V1.x.x

Version after upgrade

SDK for Java: V2.x.x.Final

SDK for C++: V3.x.x

Load balancing policies

Load balancing is performed based on queues.

If a queue-based load balancing policy is used, the following issues may occur:

  • If the number of consumers is greater than the number of queues, some consumers cannot receive messages.

  • Some consumers cannot consume messages as expected or consume messages at a low speed. Other consumers remain idle but cannot consume messages. This may cause message accumulation.

Load balancing is performed based on messages. This leads to more balanced message loads.

This also prevents idle consumers or message accumulation that are caused by queue-based load balancing policies.

Dashboard

A small number of metrics are supported, such as the number of received messages, the number of sent messages, and the number of accumulated messages.

  • Metrics that are related to message accumulation are added to help you troubleshoot issues in a more efficient manner.

  • Metrics such as the duration and success rate of each step in the messaging process are added.

The following metrics are added:

  • Producer

    • Send RT: the amount of time that is used to produce a message in a topic.

    • Send API call success rate: the success rate of message production in a topic.

  • Consumer

    • Avg consumption success rate: the success rate of message consumption in a specific instance.

    • Inflight messages: the number of messages that are being processed on the consumer client and for which no success response is returned.

    • Ready messages: the number of messages that are ready for consumption on the ApsaraMQ for RocketMQ broker. This metric reflects the number of messages that are not processed by consumers.

    • Ready message queue time: the time offset between the current point in time and the point in time when the earliest message is ready. This metric reflects the delay before ready messages are processed. This metric is important for time-sensitive workloads.

    • Message processing time: the amount of time that is used to consume a message in a group.

    • Wait to process time: the duration between the point in time when a consumer in a group receives a message and the point in time when the consumer starts to consume the message.

    • Consumption messages each protocol: the proportion of messages consumed over each type of protocol to the total consumed messages.

  • Instance top 20 info

    • Ready message queue time per GroupID: the top 20 groups with the longest queuing duration for ready messages.

    • Consumer lag per GroupID: the top 20 groups with the largest number of accumulated messages.

    • Inflight messages per GroupID: the top 20 groups with the largest number of inflight messages.

    • Message processing time per GroupID: the top 20 groups with the longest consumption duration.

    • Message wait time per GroupID: the top 20 groups with the longest duration between the point in time when a consumer in a group receives a message and the point in time when the consumer starts to consume the message.

    • Send API call failure rate per Topic: the top 20 topics with the highest failure rate of message production.

    • Consumption failure rate per GroupID: the top 20 groups with the highest failure rate of message consumption.

Message traces

Traces of advance-featured messages cannot be queried. Data that is related to message accumulation is not included in trace query results.

  • Data that is related to message consumption is included in trace query results. Message traces can be queried by using filter conditions such as exceptions, failures, and durations.

  • Traces of scheduled messages, delayed messages, and transactional messages can be queried.

  • OpenTelemetry is used throughout the entire process of a message trace query.

The following parameters are added in trace query results:

ParameterDescription
AccessKeyThe AccessKey ID of your Alibaba Cloud account or RAM user. AccessKey IDs are used to verify user identities. When you use SDKs or API operations to call ApsaraMQ for RocketMQ resources, the AccessKey ID is required for identity verification.
ReachServerThe time when a message arrived at the ApsaraMQ forRocketMQ broker.
PresetDeliverAtThe preset time for delivering a scheduled message.
ActualAvailableAtThe time when a scheduled message can be delivered to consumers. The value of this parameter indicates the time when the scheduled message becomes ready for consumption.
Available TimeThe time when a message becomes ready for consumption.
Commit/RollbackTimeThe time when a transactional message is committed or rolled back.
Arrive at Consumer AtThe time when a message arrives at a consumer client.
Wait Duration before ProcessingThe wait duration between the time when a message arrives at a consumer client and the time when the thread pool allocates threads and processing resources for the message.