Queue

class Queue : KotlinCustomResource

Provides a RabbitMQ (AMQP) Queue resource. For information about RabbitMQ (AMQP) Queue and how to use it, see What is Queue.

NOTE: Available since v1.127.0.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.amqp.Instance;
import com.pulumi.alicloud.amqp.InstanceArgs;
import com.pulumi.alicloud.amqp.VirtualHost;
import com.pulumi.alicloud.amqp.VirtualHostArgs;
import com.pulumi.alicloud.amqp.Exchange;
import com.pulumi.alicloud.amqp.ExchangeArgs;
import com.pulumi.alicloud.amqp.Queue;
import com.pulumi.alicloud.amqp.QueueArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.instanceType("enterprise")
.maxTps(3000)
.queueCapacity(200)
.storageSize(700)
.supportEip(false)
.maxEipTps(128)
.paymentType("Subscription")
.period(1)
.build());
var defaultVirtualHost = new VirtualHost("defaultVirtualHost", VirtualHostArgs.builder()
.instanceId(defaultInstance.id())
.virtualHostName("tf-example")
.build());
var defaultExchange = new Exchange("defaultExchange", ExchangeArgs.builder()
.autoDeleteState(false)
.exchangeName("tf-example")
.exchangeType("DIRECT")
.instanceId(defaultInstance.id())
.internal(false)
.virtualHostName(defaultVirtualHost.virtualHostName())
.build());
var example = new Queue("example", QueueArgs.builder()
.instanceId(defaultInstance.id())
.queueName("tf-example")
.virtualHostName(defaultVirtualHost.virtualHostName())
.build());
}
}

Import

RabbitMQ (AMQP) Queue can be imported using the id, e.g.

$ pulumi import alicloud:amqp/queue:Queue example <instance_id>:<virtual_host_name>:<queue_name>

Properties

Link copied to clipboard
val autoDeleteState: Output<Boolean>?

Specifies whether the Auto Delete attribute is configured. Valid values:

Link copied to clipboard
val autoExpireState: Output<String>?

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.

Link copied to clipboard

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.

Link copied to clipboard

The dead letter routing key.

Link copied to clipboard
val exclusiveState: Output<Boolean>?

Specifies whether the queue is an exclusive queue. Valid values:

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val instanceId: Output<String>

The ID of the instance.

Link copied to clipboard
val maximumPriority: Output<Int>?

The highest priority supported by the queue. This parameter is set to a positive integer. Valid values: 0 to 255. Recommended values: 1 to 10

Link copied to clipboard
val maxLength: Output<String>?

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.

Link copied to clipboard
val messageTtl: Output<String>?

The message TTL of the queue. If the retention period of a message in the queue exceeds the message TTL of the queue, the message expires. Message TTL must be set to a non-negative integer, in milliseconds. For example, if the message TTL of the queue is 1000, messages survive for at most 1 second in the queue.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val queueName: Output<String>

The name of the queue. The queue name must be 1 to 255 characters in length, and can contain only letters, digits, hyphens (-), underscores (_), periods (.), and at signs (@).

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val virtualHostName: Output<String>

The name of the virtual host.