Interface Management.QueueSpecification
- Enclosing interface:
Management
public static interface Management.QueueSpecification
Specification to create a queue.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionSet a queue argument.Set the queue arguments.autoDelete(boolean autoDelete) Whether the queue get automatically deleted when its last consumer unsubscribes.classic()Set the type toManagement.QueueType.CLASSICand return classic-queue-specific specification.deadLetterExchange(String dlx) The dead letter exchange.deadLetterRoutingKey(String dlrk) The dead letter routing key.declare()Declare the queue.exclusive(boolean exclusive) Whether the queue is exclusive or not.Set TTL for a queue.Leader-locator strategy (replica placement) for the queue.maxLength(long maxLength) Maximum length for a queue.maxLengthBytes(ByteCapacity maxLengthBytes) Maximum length in bytes for a queue.messageTtl(Duration ttl) Set the message TTL for the queue.The name of the queue.overflowStrategy(Management.OverflowStrategy overflow) The overflow strategy.overflowStrategy(String overflow) The overflow strategy (as a string).quorum()Set the type toManagement.QueueType.QUORUMand return quorum-queue-specific specification.singleActiveConsumer(boolean singleActiveConsumer) Activate "single active consumer" on the queue.stream()Set the type toManagement.QueueType.STREAMand return stream-specific specification.type(Management.QueueType type) The type of the queue.
-
Method Details
-
name
The name of the queue.The library will generate a random name if no name is specified.
- Parameters:
name- name- Returns:
- the queue specification
-
exclusive
Whether the queue is exclusive or not.- Parameters:
exclusive- exclusive flag- Returns:
- the queue specification
- See Also:
-
autoDelete
Whether the queue get automatically deleted when its last consumer unsubscribes.- Parameters:
autoDelete- auto-delete flag- Returns:
- the queue specification
- See Also:
-
type
The type of the queue.- Parameters:
type- queue type- Returns:
- the queue specification
- See Also:
-
deadLetterExchange
The dead letter exchange.- Parameters:
dlx- dead letter exchange- Returns:
- the queue specification
- See Also:
-
deadLetterRoutingKey
The dead letter routing key.- Parameters:
dlrk- dead letter exchange- Returns:
- the queue specification
- See Also:
-
overflowStrategy
The overflow strategy (as a string).- Parameters:
overflow- the overflow strategy- Returns:
- the queue specification
- See Also:
-
overflowStrategy
The overflow strategy.- Parameters:
overflow- overflow strategy- Returns:
- the queue specification
- See Also:
-
expires
Set TTL for a queue.- Parameters:
expiration- expiration- Returns:
- the queue specification
- See Also:
-
maxLength
Maximum length for a queue.- Parameters:
maxLength- maximum length- Returns:
- the queue specification
- See Also:
-
maxLengthBytes
Maximum length in bytes for a queue.- Parameters:
maxLengthBytes- maximum length in bytes- Returns:
- the queue specification
- See Also:
-
singleActiveConsumer
Activate "single active consumer" on the queue.- Parameters:
singleActiveConsumer- activation flag- Returns:
- the queue specification
- See Also:
-
messageTtl
Set the message TTL for the queue.- Parameters:
ttl- message TTL- Returns:
- the queue specification
- See Also:
-
leaderLocator
Leader-locator strategy (replica placement) for the queue.- Parameters:
locator- locator strategy- Returns:
- the queue specification
- See Also:
-
quorum
Management.QuorumQueueSpecification quorum()Set the type toManagement.QueueType.QUORUMand return quorum-queue-specific specification.- Returns:
- quorum queue specification
- See Also:
-
classic
Management.ClassicQueueSpecification classic()Set the type toManagement.QueueType.CLASSICand return classic-queue-specific specification.- Returns:
- classic queue specification
- See Also:
-
stream
Management.StreamSpecification stream()Set the type toManagement.QueueType.STREAMand return stream-specific specification.- Returns:
- stream specification
- See Also:
-
argument
Set a queue argument.- Parameters:
key- argument namevalue- argument value- Returns:
- the queue specification
- See Also:
-
arguments
Set the queue arguments.The argument map will replace any existing arguments.
- Parameters:
arguments- arguments- Returns:
- the queue specification
-
declare
-