public class CreateCmqSubscribeRequest extends AbstractModel
header, skipSign
Constructor and Description |
---|
CreateCmqSubscribeRequest() |
CreateCmqSubscribeRequest(CreateCmqSubscribeRequest source)
NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
|
Modifier and Type | Method and Description |
---|---|
String[] |
getBindingKey()
Get The number of `BindingKey` cannot exceed 5, and the length of each `BindingKey` cannot exceed 64 bytes.
|
String |
getEndpoint()
Get `Endpoint` for notification receipt, which is distinguished by `Protocol`.
|
String[] |
getFilterTag()
Get Message body tag (used for message filtering).
|
String |
getNotifyContentFormat()
Get Push content format.
|
String |
getNotifyStrategy()
Get CMQ push server retry policy in case an error occurs while pushing a message to `Endpoint`.
|
String |
getProtocol()
Get Subscription protocol.
|
String |
getSubscriptionName()
Get Subscription name, which must be unique in the same topic under the same account in the same region.
|
String |
getTopicName()
Get Topic name, which must be unique in the same topic under the same account in the same region.
|
void |
setBindingKey(String[] BindingKey)
Set The number of `BindingKey` cannot exceed 5, and the length of each `BindingKey` cannot exceed 64 bytes.
|
void |
setEndpoint(String Endpoint)
Set `Endpoint` for notification receipt, which is distinguished by `Protocol`.
|
void |
setFilterTag(String[] FilterTag)
Set Message body tag (used for message filtering).
|
void |
setNotifyContentFormat(String NotifyContentFormat)
Set Push content format.
|
void |
setNotifyStrategy(String NotifyStrategy)
Set CMQ push server retry policy in case an error occurs while pushing a message to `Endpoint`.
|
void |
setProtocol(String Protocol)
Set Subscription protocol.
|
void |
setSubscriptionName(String SubscriptionName)
Set Subscription name, which must be unique in the same topic under the same account in the same region.
|
void |
setTopicName(String TopicName)
Set Topic name, which must be unique in the same topic under the same account in the same region.
|
void |
toMap(HashMap<String,String> map,
String prefix)
Internal implementation, normal users should not use it.
|
any, fromJsonString, getBinaryParams, GetHeader, getMultipartRequestParams, getSkipSign, set, SetHeader, setParamArrayObj, setParamArraySimple, setParamObj, setParamSimple, setSkipSign, toJsonString
public CreateCmqSubscribeRequest()
public CreateCmqSubscribeRequest(CreateCmqSubscribeRequest source)
public String getTopicName()
public void setTopicName(String TopicName)
TopicName
- 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.public String getSubscriptionName()
public void setSubscriptionName(String SubscriptionName)
SubscriptionName
- 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.public String getProtocol()
public void setProtocol(String Protocol)
Protocol
- Subscription protocol. Currently, two protocols are supported: HTTP and queue. To use the HTTP protocol, you need to build your own web server to receive messages. With the queue protocol, messages are automatically pushed to a CMQ queue and you can pull them concurrently.public String getEndpoint()
public void setEndpoint(String Endpoint)
Endpoint
- `Endpoint` for notification receipt, which is distinguished by `Protocol`. For `http`, `Endpoint` must begin with `http://` and `host` can be a domain name or IP. For `Queue`, enter `QueueName`. Note that currently the push service cannot push messages to a VPC; therefore, if a VPC domain name or address is entered for `Endpoint`, pushed messages will not be received. Currently, messages can be pushed only to the public network and classic network.public String getNotifyStrategy()
public void setNotifyStrategy(String NotifyStrategy)
NotifyStrategy
- CMQ push server retry policy in case an error occurs while pushing a message to `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.public String[] getFilterTag()
public void setFilterTag(String[] FilterTag)
FilterTag
- 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.public String[] getBindingKey()
public void setBindingKey(String[] BindingKey)
BindingKey
- 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).public String getNotifyContentFormat()
public void setNotifyContentFormat(String NotifyContentFormat)
NotifyContentFormat
- 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 options are acceptable, and the default value is `JSON`.Copyright © 2024. All rights reserved.