Class MessageParams<V>
- Type Parameters:
V- type
- All Implemented Interfaces:
MessageArgs<V>
- Author:
- Nikita Koksharov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeduplicationByHash(Duration interval) Enables deduplication based on the payload hash for the specified interval.deduplicationById(Object id, Duration interval) Enables deduplication based on a custom ID for the specified interval.Sets a delay interval before the message becomes available for processing.deliveryLimit(int value) Sets the maximum number of delivery attempts for the message.intintlongAdds a single header entry to the message.Adds multiple header entries to the message at once.priority(int priority) Sets the priority level for the message.timeToLive(Duration duration) Sets the time-to-live duration for the message.
-
Constructor Details
-
MessageParams
-
-
Method Details
-
priority
Description copied from interface:MessageArgsSets the priority level for the message. Defined as a number between0and90is the lowest priority level.9is the highest priority level.Default value is
0.- Specified by:
priorityin interfaceMessageArgs<V>- Parameters:
priority- the priority level- Returns:
- arguments object
-
delay
Description copied from interface:MessageArgsSets a delay interval before the message becomes available for processing.0value means delay duration is not applied. If not defined, the queue's delay setting value is used. If queue's delay setting is also not set, the default value is0.- Specified by:
delayin interfaceMessageArgs<V>- Parameters:
interval- the time duration to delay message delivery- Returns:
- arguments object
-
timeToLive
Description copied from interface:MessageArgsSets the time-to-live duration for the message.After this duration has elapsed, the message is removed from the queue if it hasn't been processed.
0value means expiration is not applied. If not defined, the queue's timeToLive setting value is used. If queue's timeToLive setting is also not set, the default value is0.- Specified by:
timeToLivein interfaceMessageArgs<V>- Parameters:
duration- the time duration- Returns:
- arguments object
-
deliveryLimit
Description copied from interface:MessageArgsSets the maximum number of delivery attempts for the message.If processing the message fails, it may be redelivered up to the specified count.
The minimum value is1. If not defined, the queue's deliveryLimit setting value is used. If queue's deliveryLimit setting is also not set, the default value is10.- Specified by:
deliveryLimitin interfaceMessageArgs<V>- Parameters:
value- the maximum number of delivery attempts- Returns:
- arguments object
-
header
Description copied from interface:MessageArgsAdds a single header entry to the message.- Specified by:
headerin interfaceMessageArgs<V>- Parameters:
key- the header keyvalue- the header value- Returns:
- arguments object
-
headers
Description copied from interface:MessageArgsAdds multiple header entries to the message at once.- Specified by:
headersin interfaceMessageArgs<V>- Parameters:
entries- a map containing header key-value pairs- Returns:
- arguments object
-
deduplicationByHash
Description copied from interface:MessageArgsEnables deduplication based on the payload hash for the specified interval.During the specified interval, messages with the same hash will be considered duplicates and won't be added to the queue.
- Specified by:
deduplicationByHashin interfaceMessageArgs<V>- Parameters:
interval- the time duration- Returns:
- arguments object
-
deduplicationById
Description copied from interface:MessageArgsEnables deduplication based on a custom ID for the specified interval.During the specified interval, messages with the same ID will be considered duplicates and won't be added to the queue.
- Specified by:
deduplicationByIdin interfaceMessageArgs<V>- Parameters:
id- the custom identifierinterval- the time duration- Returns:
- arguments object
-
deduplicationByHash
-
deduplicationById
-
getRetentionDuration
public long getRetentionDuration() -
getReceiveLimit
public int getReceiveLimit() -
getHeaders
-
getPayload
-
getDeduplicationMode
-
getDeduplicationInterval
-
getDeduplicationId
-
getDelayInterval
-
getPriority
public int getPriority()
-