All Products
Search
Document Center

ApsaraMQ for Kafka:API frequently asked questions

Last Updated:Mar 10, 2026

Why does LastTimestamp return -1 when I call the GetConsumerProgess operation?

The LastTimestamp parameter in the GetConsumerProgess response represents the timestamp when the last consumed message was originally sent by the producer.

Possible causes for LastTimestamp returning -1:

  • The subscribed topics do not use cloud storage.

  • The producer client version is outdated.

  • The consumer group was auto-created rather than manually registered.

The following sections describe each cause and how to resolve it.

The topic does not use cloud storage

LastTimestamp is supported only for topics that use cloud storage. If your subscribed topics do not use cloud storage, the API returns -1.

How to check: In the ApsaraMQ for Kafka console, check the storage type of each topic that your consumer group subscribes to.

The producer client version is outdated

An outdated producer client may not include the sending timestamp in messages, which causes the message sending time to be null. When the sending time is null, GetConsumerProgess returns -1 for LastTimestamp.

How to check: Verify the version of your producer client. If messages are sent without timestamps, the client version is outdated.

How to fix: Upgrade your producer client to the latest version. After the upgrade, new messages include the sending timestamp, and LastTimestamp returns valid values.

The consumer group was auto-created

If the consumer group was created automatically rather than manually registered, LastTimestamp cannot be returned correctly.

How to check: In the ApsaraMQ for Kafka console, check whether the consumer group was created automatically or manually registered.

How to fix: Create and register a consumer group with the same name in the ApsaraMQ for Kafka console. After registration, LastTimestamp returns the expected value.