Skip to content

Queue

This class encapsulates and extends the ROS resource type ALIYUN::AMQP::Queue.

Initializers

import com.aliyun.ros.cdk.amqp.Queue;
Queue.Builder.create(Construct scope, java.lang.String id, java.lang.Boolean enableResourcePropertyConstraint)
    .instanceId(java.lang.String)
    .instanceId(IResolvable)
    .queueName(java.lang.String)
    .queueName(IResolvable)
    .virtualHost(java.lang.String)
    .virtualHost(IResolvable)
//  .autoDeleteState(java.lang.Boolean)
//  .autoDeleteState(IResolvable)
//  .autoExpireState(java.lang.Number)
//  .autoExpireState(IResolvable)
//  .deadLetterExchange(java.lang.String)
//  .deadLetterExchange(IResolvable)
//  .deadLetterRoutingKey(java.lang.String)
//  .deadLetterRoutingKey(IResolvable)
//  .exclusiveState(java.lang.Boolean)
//  .exclusiveState(IResolvable)
//  .maximumPriority(java.lang.Number)
//  .maximumPriority(IResolvable)
//  .maxLength(java.lang.Number)
//  .maxLength(IResolvable)
//  .messageTtl(java.lang.Number)
//  .messageTtl(IResolvable)
    .build();
Name Type Description
scope com.aliyun.ros.cdk.core.Construct No description.
id java.lang.String No description.
enableResourcePropertyConstraint java.lang.Boolean No description.
instanceId java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property instanceId: InstanceId.
queueName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property queueName: The name of the queue to create.
virtualHost java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property virtualHost: The name of the vhost to which the queue belongs.
autoDeleteState java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property autoDeleteState: Specifies whether the Auto Delete attribute is configured.
autoExpireState java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property autoExpireState: The auto-expiration time for the queue.
deadLetterExchange java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property deadLetterExchange: The dead-letter exchange.
deadLetterRoutingKey java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Property deadLetterRoutingKey: The dead-letter routing key.
exclusiveState java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable Property exclusiveState: Specifies whether the queue is an exclusive queue.
maximumPriority java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property maximumPriority: The priority of the queue.
maxLength java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property maxLength: This parameter is not supported in the current version.
messageTtl java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable Property messageTtl: The message TTL of the queue If a message is retained in the Queue longer than the configured message lifetime, the message expires.

scopeRequired

  • Type: com.aliyun.ros.cdk.core.Construct

idRequired

  • Type: java.lang.String

enableResourcePropertyConstraintOptional

  • Type: java.lang.Boolean

instanceIdRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property instanceId: InstanceId.


queueNameRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property queueName: The name of the queue to create.

  • The queue name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The name must be 1 to 255 characters in length.
  • After a queue is created, its name cannot be changed. To change the name, delete the queue and create a new one.

virtualHostRequired

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property virtualHost: The name of the vhost to which the queue belongs.

The name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The name must be 1 to 255 characters in length.


autoDeleteStateOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property autoDeleteState: Specifies whether the Auto Delete attribute is configured.

Valid values: true: The Auto Delete attribute is configured. The queue is automatically deleted after the last subscription from consumers to this queue is canceled. false: The Auto Delete attribute is not configured.


autoExpireStateOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property autoExpireState: The auto-expiration time for the queue.

The queue is automatically deleted if it is not accessed within the specified time period. Unit: milliseconds.

This feature must be enabled before you can use this parameter. To enable the feature, .


deadLetterExchangeOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property deadLetterExchange: The dead-letter exchange.

A dead-letter exchange is used to receive rejected messages. If a consumer rejects a message that cannot be retried, this message is routed to a specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange.


deadLetterRoutingKeyOptional

  • Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable

Property deadLetterRoutingKey: The dead-letter routing key.

The key can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The key must be 1 to 255 characters in length.


exclusiveStateOptional

  • Type: java.lang.Boolean OR com.aliyun.ros.cdk.core.IResolvable

Property exclusiveState: Specifies whether the queue is an exclusive queue.

Valid values:

  • true: The queue is an exclusive queue. An exclusive queue can be used only by the connection that declares it. The queue is automatically deleted after the connection is closed.
  • false: The queue is not an exclusive queue.

maximumPriorityOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property maximumPriority: The priority of the queue.

The recommended value is an integer from 1 to 10.

This parameter is used for message priority. It is supported only by dedicated instances and can be used only after the message priority feature is enabled. To enable the feature, .


maxLengthOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property maxLength: This parameter is not supported in the current version.

The maximum number of messages that can be stored in the queue. If this limit is exceeded, the earliest messages in the queue are deleted.


messageTtlOptional

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

Property messageTtl: The message TTL of the queue If a message is retained in the Queue longer than the configured message lifetime, the message expires.

The value of message lifetime must be a non-negative integer, up to 1 day. The unit is milliseconds


Methods

Name Description
toString Returns a string representation of this construct.
synthesize Allows this construct to emit artifacts into the cloud assembly during synthesis.
addCondition No description.
addCount No description.
addDependency No description.
addResourceDesc No description.
applyRemovalPolicy No description.
fetchCondition No description.
fetchDependency No description.
fetchResourceDesc No description.
getAtt No description.
setMetadata No description.

toString

public java.lang.String toString()

Returns a string representation of this construct.

synthesize

public void synthesize(ISynthesisSession session)

Allows this construct to emit artifacts into the cloud assembly during synthesis.

This method is usually implemented by framework-level constructs such as Stack and Asset as they participate in synthesizing the cloud assembly.

sessionRequired

  • Type: com.aliyun.ros.cdk.core.ISynthesisSession

The synthesis session.


addCondition

public void addCondition(RosCondition condition)

conditionRequired

  • Type: com.aliyun.ros.cdk.core.RosCondition

addCount

public void addCount(java.lang.Number OR IResolvable count)

countRequired

  • Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable

addDependency

public void addDependency(Resource resource)

resourceRequired

  • Type: com.aliyun.ros.cdk.core.Resource

addResourceDesc

public void addResourceDesc(java.lang.String desc)

descRequired

  • Type: java.lang.String

applyRemovalPolicy

public void applyRemovalPolicy(RemovalPolicy policy)

policyRequired

  • Type: com.aliyun.ros.cdk.core.RemovalPolicy

fetchCondition

public RosCondition fetchCondition()

fetchDependency

public java.util.List<java.lang.String> fetchDependency()

fetchResourceDesc

public java.lang.String fetchResourceDesc()

getAtt

public IResolvable getAtt(java.lang.String name)

nameRequired

  • Type: java.lang.String

setMetadata

public void setMetadata(java.lang.String key, java.lang.Object value)

keyRequired

  • Type: java.lang.String

valueRequired

  • Type: java.lang.Object

Static Functions

Name Description
isConstruct Return whether the given object is a Construct.

isConstruct

import com.aliyun.ros.cdk.amqp.Queue;
Queue.isConstruct(java.lang.Object x)

Return whether the given object is a Construct.

xRequired

  • Type: java.lang.Object

Properties

Name Type Description
node com.aliyun.ros.cdk.core.ConstructNode The construct tree node associated with this construct.
env com.aliyun.ros.cdk.core.IResourceEnvironment The environment this resource belongs to.
ref java.lang.String No description.
stack com.aliyun.ros.cdk.core.Stack The stack in which this resource is defined.
resource com.aliyun.ros.cdk.core.RosResource No description.
attrQueueName java.lang.String OR com.aliyun.ros.cdk.core.IResolvable Attribute QueueName: The name of the queue.
props QueueProps No description.

nodeRequired

public ConstructNode getNode();
  • Type: com.aliyun.ros.cdk.core.ConstructNode

The construct tree node associated with this construct.


envRequired

public IResourceEnvironment getEnv();
  • Type: com.aliyun.ros.cdk.core.IResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


refRequired

public java.lang.String getRef();
  • Type: java.lang.String

stackRequired

public Stack getStack();
  • Type: com.aliyun.ros.cdk.core.Stack

The stack in which this resource is defined.


resourceOptional

public RosResource getResource();
  • Type: com.aliyun.ros.cdk.core.RosResource

attrQueueNameRequired

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

Attribute QueueName: The name of the queue.


propsRequired

public QueueProps getProps();