Package org.redisson.api.queue
Class QueueConfigParams
java.lang.Object
org.redisson.api.queue.QueueConfigParams
- All Implemented Interfaces:
QueueConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeadLetterQueueName(String value) Sets the name of the Dead Letter Queue (DLQ) to which messages that have reached the delivery limit or have been rejected are sent.Sets the delay duration before a message becomes available for consumption after being added to the queue. 0 value means delay duration is not applied.deliveryLimit(int value) Defines the maximum number of delivery attempts for a message.getDelay()intintintgetTtl()maxMessageSize(int value) Sets the maximum allowed size (in bytes) for a single message in the queue.maxSize(int value) Sets the maximum number of messages that can be stored in the queue.processingMode(ProcessingMode mode) Sets the processing mode for the queue which determines how messages are processed by consumers.timeToLive(Duration value) Sets the time-to-live duration for messages in the queue.visibility(Duration value) Sets the duration for which a message becomes invisible to other consumers after being polled.
-
Constructor Details
-
QueueConfigParams
public QueueConfigParams()
-
-
Method Details
-
deliveryLimit
Description copied from interface:QueueConfigDefines the maximum number of delivery attempts for a message. Once this limit is reached, the message may be moved to a dead letter queue if it's configured, otherwise it will be deleted. Can be overridden when adding a message.Default value is 10 attempts.
- Specified by:
deliveryLimitin interfaceQueueConfig- Parameters:
value- the maximum number of delivery attempts- Returns:
- config object
-
visibility
Description copied from interface:QueueConfigSets the duration for which a message becomes invisible to other consumers after being polled. This prevents multiple consumers from processing the same message simultaneously. Can be overridden when pooling a message.Default value is 30 seconds.
- Specified by:
visibilityin interfaceQueueConfig- Parameters:
value- the visibility timeout duration- Returns:
- config object
-
timeToLive
Description copied from interface:QueueConfigSets the time-to-live duration for messages in the queue. Messages will be automatically removed from the queue after this duration expires. 0 value means expiration is not applied. Can be overridden when adding a message.Default value is 0.
- Specified by:
timeToLivein interfaceQueueConfig- Parameters:
value- the time-to-live duration- Returns:
- config object
-
deadLetterQueueName
Description copied from interface:QueueConfigSets the name of the Dead Letter Queue (DLQ) to which messages that have reached the delivery limit or have been rejected are sent.Dead letter queue can be removed by setting null value.
- Specified by:
deadLetterQueueNamein interfaceQueueConfig- Parameters:
value- the name of the dead letter queue- Returns:
- config object
-
maxMessageSize
Description copied from interface:QueueConfigSets the maximum allowed size (in bytes) for a single message in the queue. Messages exceeding this size will be rejected. 0 value means size limit is not applied.Default value is 0.
- Specified by:
maxMessageSizein interfaceQueueConfig- Parameters:
value- the maximum message size in bytes- Returns:
- config object
-
delay
Description copied from interface:QueueConfigSets the delay duration before a message becomes available for consumption after being added to the queue. 0 value means delay duration is not applied. Can be overridden when adding a message.Default value is 0.
- Specified by:
delayin interfaceQueueConfig- Parameters:
value- the delay duration- Returns:
- config object
-
maxSize
Description copied from interface:QueueConfigSets the maximum number of messages that can be stored in the queue. When the queue reaches this size, add messages operation may be blocked and/or return empty result. 0 value means queue size limit is not applied.Default value is 0.
- Specified by:
maxSizein interfaceQueueConfig- Parameters:
value- the maximum queue size- Returns:
- config object
-
processingMode
Description copied from interface:QueueConfigSets the processing mode for the queue which determines how messages are processed by consumers.- Specified by:
processingModein interfaceQueueConfig- Parameters:
mode- the processing mode- Returns:
- config object
-
getDeliveryLimit
public int getDeliveryLimit() -
getVisibilityTimeout
-
getTtl
-
getDeadLetterQueueName
-
getMaxMessageSize
public int getMaxMessageSize() -
getDelay
-
getMaxSize
public int getMaxSize() -
getProcessingMode
-