Queue
This class encapsulates and extends the ROS resource type ALIYUN::AMQP::Queue
, which is used to create a 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. |
virtualHost |
java.lang.String OR com.aliyun.ros.cdk.core.IResolvable |
Property virtualHost: The name of the virtual host. |
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 validity period after which the queue is automatically deleted. |
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 function is not supported. |
maxLength |
java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable |
Property maxLength: The maximum number of messages that can be stored in the queue. |
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. |
scope
Required
- Type: com.aliyun.ros.cdk.core.Construct
id
Required
- Type: java.lang.String
enableResourcePropertyConstraint
Optional
- Type: java.lang.Boolean
instanceId
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property instanceId: InstanceId.
queueName
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property queueName: The name of the queue.
virtualHost
Required
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property virtualHost: The name of the virtual host.
autoDeleteState
Optional
- 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.
autoExpireState
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property autoExpireState: The validity period after which the queue is automatically deleted.
If the queue is not accessed within a specified period of time, it is automatically deleted.
deadLetterExchange
Optional
- 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.
deadLetterRoutingKey
Optional
- Type: java.lang.String OR com.aliyun.ros.cdk.core.IResolvable
Property deadLetterRoutingKey: The dead letter routing key.
exclusiveState
Optional
- 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. It can be used only for the connection that declares the exclusive queue. After the connection is closed, the exclusive queue is automatically deleted. false: The Auto Delete attribute is not configured.
maximumPriority
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maximumPriority: The priority function is not supported.
maxLength
Optional
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
Property maxLength: The maximum number of messages that can be stored in the queue.
If this threshold is exceeded, the earliest messages that are routed to the queue are discarded.
messageTtl
Optional
- 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. |
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.
- Type: com.aliyun.ros.cdk.core.ISynthesisSession
The synthesis session.
addCondition
public void addCondition(RosCondition condition)
- Type: com.aliyun.ros.cdk.core.RosCondition
addCount
public void addCount(java.lang.Number OR IResolvable count)
- Type: java.lang.Number OR com.aliyun.ros.cdk.core.IResolvable
addDependency
public void addDependency(Resource resource)
- Type: com.aliyun.ros.cdk.core.Resource
addResourceDesc
public void addResourceDesc(java.lang.String desc)
- Type: java.lang.String
applyRemovalPolicy
public void applyRemovalPolicy(RemovalPolicy policy)
- Type: com.aliyun.ros.cdk.core.RemovalPolicy
getAtt
public IResolvable getAtt(java.lang.String name)
- Type: java.lang.String
setMetadata
public void setMetadata(java.lang.String key, java.lang.Object value)
- Type: java.lang.String
- 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.
- Type: java.lang.Object
Properties
Name | Type | Description |
---|---|---|
node |
com.aliyun.ros.cdk.core.ConstructNode |
The construct tree node associated with this construct. |
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 |
com.aliyun.ros.cdk.core.IResolvable |
Attribute QueueName: The name of the queue. |
node
Required
public ConstructNode getNode();
- Type: com.aliyun.ros.cdk.core.ConstructNode
The construct tree node associated with this construct.
ref
Required
public java.lang.String getRef();
- Type: java.lang.String
stack
Required
public Stack getStack();
- Type: com.aliyun.ros.cdk.core.Stack
The stack in which this resource is defined.
resource
Optional
public RosResource getResource();
- Type: com.aliyun.ros.cdk.core.RosResource
attrQueueName
Required
public IResolvable getAttrQueueName();
- Type: com.aliyun.ros.cdk.core.IResolvable
Attribute QueueName: The name of the queue.