tencent cloud

Feedback

ModifyCmqSubscriptionAttribute

Last updated: 2023-08-09 14:43:34

1. API Description

Domain name for API request: tdmq.tencentcloudapi.com.

This API is used to modify the attributes of a CMQ subscription.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: ModifyCmqSubscriptionAttribute.
Version Yes String Common Params. The value used for this API: 2020-02-17.
Region No String Common Params. This parameter is not required for this API.
TopicName Yes String Topic name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
SubscriptionName Yes String Subscription name, which must be unique in the same topic under the same account in the same region. It can contain up to 64 letters, digits, and hyphens and must begin with a letter.
NotifyStrategy No String CMQ push server retry policy in case an error occurs while pushing a message to the endpoint. Valid values:
(1) BACKOFF_RETRY: backoff retry, which is to retry at a fixed interval, discard the message after a certain number of retries, and continue to push the next message.
(2) EXPONENTIAL_DECAY_RETRY: exponential decay retry, which is to retry at an exponentially increasing interval, such as 1s, 2s, 4s, 8s, and so on. As a message can be retained in a topic for one day, failed messages will be discarded at most after one day of retry. Default value: EXPONENTIAL_DECAY_RETRY.
NotifyContentFormat No String Push content format. Valid values: 1. JSON; 2. SIMPLIFIED, i.e., the raw format. If Protocol is queue, this value must be SIMPLIFIED. If Protocol is HTTP, both values are acceptable, and the default value is JSON.
FilterTags.N No Array of String Message body tag (used for message filtering). The number of tags cannot exceed 5, and each tag can contain up to 16 characters. It is used in conjunction with the MsgTag parameter of (Batch)PublishMessage. Rules: 1. If FilterTag is not configured, no matter whether MsgTag is configured, the subscription will receive all messages published to the topic; 2. If the array of FilterTag values has a value, only when at least one of the values in the array also exists in the array of MsgTag values (i.e., FilterTag and MsgTag have an intersection) can the subscription receive messages published to the topic; 3. If the array of FilterTag values has a value, but MsgTag is not configured, then no message published to the topic will be received, which can be considered as a special case of rule 2 as FilterTag and MsgTag do not intersect in this case. The overall design idea of rules is based on the intention of the subscriber.
BindingKey.N No Array of String The number of BindingKey cannot exceed 5, and the length of each BindingKey cannot exceed 64 bytes. This field indicates the filtering policy for subscribing to and receiving messages. Each BindingKey includes up to 15 dots (namely up to 16 segments).

3. Output Parameters

Parameter Name Type Description
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Modifying subscription attributes

Input Example

https://tdmq.tencentcloudapi.com/?Action=ModifyCmqSubscriptionAttribute
&TopicName=test
&SubscriptionName=test
&<Common request parameters>

Output Example

{
    "Response": {
        "RequestId": "3e0dff9d-9ed5-47c3-beb2-a42c1d69e1cc"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation Operation failed.