/* * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ namespace TencentCloud.Cmq.V20190304.Models { using Newtonsoft.Json; using System.Collections.Generic; using TencentCloud.Common; public class ModifySubscriptionAttributeRequest : AbstractModel { /// /// 主题名字,在单个地域同一帐号下唯一。主题名称是一个不超过64个字符的字符串,必须以字母为首字符,剩余部分可以包含字母、数字和横划线(-)。 /// [JsonProperty("TopicName")] public string TopicName{ get; set; } /// /// 订阅名字,在单个地域同一帐号的同一主题下唯一。订阅名称是一个不超过64个字符的字符串,必须以字母为首字符,剩余部分可以包含字母、数字和横划线(-)。 /// [JsonProperty("SubscriptionName")] public string SubscriptionName{ get; set; } /// /// 向 Endpoint 推送消息出现错误时,CMQ 推送服务器的重试策略。取值如下: /// (1)BACKOFF_RETRY,退避重试。每隔一定时间重试一次,重试够一定次数后,就把该消息丢弃,继续推送下一条消息。 /// (2)EXPONENTIAL_DECAY_RETRY,指数衰退重试。每次重试的间隔是指数递增的,例如开始1s,后面是2s,4s,8s···由于 Topic 消息的周期是一天,所以最多重试一天就把消息丢弃。默认值是 EXPONENTIAL_DECAY_RETRY。 /// [JsonProperty("NotifyStrategy")] public string NotifyStrategy{ get; set; } /// /// 推送内容的格式。取值:(1)JSON;(2)SIMPLIFIED,即 raw 格式。如果 Protocol 是 queue,则取值必须为 SIMPLIFIED。如果 Protocol 是 HTTP,两个值均可以,默认值是 JSON。 /// [JsonProperty("NotifyContentFormat")] public string NotifyContentFormat{ get; set; } /// /// 消息正文。消息标签(用于消息过滤)。标签数量不能超过5个,每个标签不超过16个字符。与(Batch)PublishMessage的MsgTag参数配合使用,规则:1)如果FilterTag没有设置,则无论MsgTag是否有设置,订阅接收所有发布到Topic的消息;2)如果FilterTag数组有值,则只有数组中至少有一个值在MsgTag数组中也存在时(即FilterTag和MsgTag有交集),订阅才接收该发布到Topic的消息;3)如果FilterTag数组有值,但MsgTag没设置,则不接收任何发布到Topic的消息,可以认为是2)的一种特例,此时FilterTag和MsgTag没有交集。规则整体的设计思想是以订阅者的意愿为主。 /// [JsonProperty("FilterTags")] public string[] FilterTags{ get; set; } /// /// BindingKey数量不超过5个, 每个BindingKey长度不超过64字节,该字段表示订阅接收消息的过滤策略,每个BindingKey最多含有15个“.”, 即最多16个词组。 /// [JsonProperty("BindingKey")] public string[] BindingKey{ get; set; } /// /// For internal usage only. DO NOT USE IT. /// internal override void ToMap(Dictionary map, string prefix) { this.SetParamSimple(map, prefix + "TopicName", this.TopicName); this.SetParamSimple(map, prefix + "SubscriptionName", this.SubscriptionName); this.SetParamSimple(map, prefix + "NotifyStrategy", this.NotifyStrategy); this.SetParamSimple(map, prefix + "NotifyContentFormat", this.NotifyContentFormat); this.SetParamArraySimple(map, prefix + "FilterTags.", this.FilterTags); this.SetParamArraySimple(map, prefix + "BindingKey.", this.BindingKey); } } }