Tüm Ürünler
Search
Belge Merkezi

:OnsConsumerResetOffset

Son Güncelleme:Sep 30, 2026

Bir tüketici grubu için tüketici ofsetini belirtilen bir zaman damgasına sıfırlar.

Operation description

Not

Alibaba Cloud tarafından sağlanan API işlemleri, Alibaba Cloud hizmetlerinin kaynaklarını yönetmek ve sorgulamak için kullanılır. Bu API işlemlerini yalnızca yönetim sistemlerine entegre etmenizi öneririz. Bu API işlemlerini mesajlaşma hizmetlerinin çekirdek sisteminde kullanmayın. Aksi takdirde sistem riskleri oluşabilir.

Birikmiş mesajları temizlemek veya bir tüketici ofsetini belirtilen bir zaman damgasına sıfırlamak için bu işlemi çağırabilirsiniz. Birikmiş mesajları temizlemek için aşağıdaki yöntemlerden birini kullanabilirsiniz:

  • Belirtilen bir konudaki tüm birikmiş mesajları temizleyin.

  • Belirtilen bir zaman noktasından önce belirtilen konuya yayımlanan mesajları temizleyin.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

mq:ResetConsumerOffset

get

Topic

acs:mq:{#regionId}:{#accountId}:{#TopicName}

Topic

acs:mq:{#regionId}:{#accountId}:{#InstanceId}%{#TopicName}

None
  • mq:OnsInstanceBaseInfo

Request parameters

Parameter

Type

Required

Description

Example

GroupId

string

Yes

Ulaşılamayan mesajı sorgulamak istediğiniz tüketici grubunun kimliği.

GID_test_consumer_id

Topic

string

Yes

Tüketici ofsetini sıfırlamak istediğiniz konunun adı.

test-mq-topic

Type

integer

Yes

Birikmiş mesajları temizlemek için kullanmak istediğiniz yöntem. Geçerli değerler:

  • 0: Tüm birikmiş mesajlar temizlenir. Tüketilmeyen mesajlar yok sayılır. Belirtilen tüketici grubundaki tüketiciler yalnızca belirtilen zaman noktasından sonra konuya yayımlanan mesajları tüketir.

"reconsumeLater" döndürülürse, sistem mesajları tüketicilere yeniden göndermeyi denediği için birikmiş mesajlar temizlenmez.

  • 1: Belirtilen zaman noktasından önce konuya yayımlanan mesajlar temizlenir. Bir zaman noktası belirtmeniz gerekir. Belirtilen tüketici grubundaki tüketiciler yalnızca belirtilen zaman noktasından sonra konuya yayımlanan mesajları tüketir.

Konuya bir mesajın yayımlandığı en erken zaman noktasından konuya bir mesajın yayımlandığı en son zaman noktasına kadar bir zaman noktası belirtebilirsiniz. İzin verilen zaman aralığında olmayan zaman noktaları geçersizdir.

1

ResetTimestamp

integer

No

Tüketici ofsetini sıfırlamak istediğiniz zaman damgası. Bu parametre yalnızca Type parametresi 1 olarak ayarlandığında geçerlidir. Birim: milisaniye.

1591153871000

InstanceId

string

No

Tüketici grubunun ait olduğu örneğin kimliği.

MQ_INST_111111111111_DOxxxxxx

Response elements

Element

Type

Description

Example

object

RequestId

string

İsteğin kimliği. Bu parametre ortak bir parametredir. Her isteğin benzersiz bir kimliği vardır. Sorunları gidermek için bu kimliği kullanabilirsiniz.

D52C68F8-EC5D-4294-BFFF-1A6A25AF****

Examples

Success response

JSON format

{
  "RequestId": "D52C68F8-EC5D-4294-BFFF-1A6A25AF****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.