Skip to content

SubscriptionProps

Properties for defining a Subscription.

See https://www.alibabacloud.com/help/ros/developer-reference/aliyun-mns-subscription

Initializer

import com.aliyun.ros.cdk.mns.SubscriptionProps;
SubscriptionProps.builder()
    .endpoint(java.lang.String)
    .endpoint(IResolvable)
    .subscriptionName(java.lang.String)
    .subscriptionName(IResolvable)
    .topicName(java.lang.String)
    .topicName(IResolvable)
//  .dlqPolicy(IResolvable)
//  .dlqPolicy(DlqPolicyProperty)
//  .filterTag(java.lang.String)
//  .filterTag(IResolvable)
//  .notifyContentFormat(java.lang.String)
//  .notifyContentFormat(IResolvable)
//  .notifyStrategy(java.lang.String)
//  .notifyStrategy(IResolvable)
//  .pushType(java.lang.String)
//  .pushType(IResolvable)
    .build();

Properties

Name Type Description
endpoint java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property endpoint: The message delivery endpoint.
subscriptionName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property subscriptionName: Subscription name.
topicName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property topicName: Topic name.
dlqPolicy com.aliyun.ros.cdk.core.IResolvable OR DlqPolicyProperty Property dlqPolicy: Dead-letter queue policy.
filterTag java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property filterTag: Message filter tag in the created subscription (Only messages with consistent tags are pushed.) The value is a string of no more than 16 characters. The default value is no message filter.
notifyContentFormat java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property notifyContentFormat: Format of the message content pushed to the endpoint.
notifyStrategy java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property notifyStrategy: Retry policy that will be applied when an error occurs during message push to the endpoint.
pushType java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property pushType: Push type of the created subscription.

endpointRequired

public java.lang.Object getEndpoint();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property endpoint: The message delivery endpoint.

The format varies based on the PushType value:

  • If PushType is http: An HTTP/HTTPS callback URL, such as http:\/\/example.com\/callback or https:\/\/example.com\/callback.
  • If PushType is queue: The ARN of the destination queue, in the format acs:mns:{RegionId}:{account ID}:queues\/{QueueName}.
  • If PushType is dm: The endpoint for email push, in the fixed format smq-ep:dm:{account ID}:__dynamic. Replace {account ID} with your account ID.
  • If PushType is dysms: The endpoint for SMS push, in the format smq-ep:dysms:{account ID}:{MobileNumber}.
  • If PushType is kafka: The Kafka push endpoint.
  • If PushType is fc: The endpoint for Function Compute, in the format acs:fc:{RegionId}:{account ID}:services\/{ServiceName}\/functions\/{FunctionName}.
  • If PushType is eventbus: The endpoint for EventBridge, in the format acs:eventbridge:{RegionId}:{account ID}:eventbus\/{EventBusName}.

subscriptionNameRequired

public java.lang.Object getSubscriptionName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property subscriptionName: Subscription name.


topicNameRequired

public java.lang.Object getTopicName();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property topicName: Topic name.


dlqPolicyOptional

public java.lang.Object getDlqPolicy();

Property dlqPolicy: Dead-letter queue policy.


filterTagOptional

public java.lang.Object getFilterTag();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property filterTag: Message filter tag in the created subscription (Only messages with consistent tags are pushed.) The value is a string of no more than 16 characters. The default value is no message filter.


notifyContentFormatOptional

public java.lang.Object getNotifyContentFormat();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property notifyContentFormat: Format of the message content pushed to the endpoint.

XML, JSON, or SIMPLIFIED; default value: XML. For details about message formats, refer to Basic Concepts/NotifyContentFormat.


notifyStrategyOptional

public java.lang.Object getNotifyStrategy();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property notifyStrategy: Retry policy that will be applied when an error occurs during message push to the endpoint.

BACKOFF_RETRY or EXPONENTIAL_DECAY_RETRY; default value: BACKOFF_RETRY. For details about retry policies, refer to Basic Concepts/NotifyStrategy.


pushTypeOptional

public java.lang.Object getPushType();
  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property pushType: Push type of the created subscription.