Package io.awspring.cloud.sqs.operations
Interface MessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
- Type Parameters:
O
- the options subclass to be returned by the chained methods.
- All Known Subinterfaces:
SqsTemplateOptions
- All Known Implementing Classes:
AbstractMessagingTemplate.AbstractMessagingTemplateOptions
public interface MessagingTemplateOptions<O extends MessagingTemplateOptions<O>>
Options to be used by the template.
-
Method Summary
Modifier and TypeMethodDescriptionacknowledgementMode
(TemplateAcknowledgementMode acknowledgementMode) Set the acknowledgement mode for this template.additionalHeaderForReceive
(String name, Object value) Set a default header to be added to received messages.additionalHeadersForReceive
(Map<String, Object> defaultAdditionalHeaders) Set default headers to be added to received messages.defaultMaxNumberOfMessages
(Integer defaultMaxNumberOfMessages) Set the default maximum number of messages to be retrieved in a single batch.defaultPayloadClass
(Class<?> defaultPayloadClass) The default class to which this template should convert payloads to.defaultPollTimeout
(Duration defaultPollTimeout) Set the default maximum amount of time this template will wait for the maximum number of messages before returning.sendBatchFailureHandlingStrategy
(SendBatchFailureHandlingStrategy sendBatchFailureHandlingStrategy) Set the strategy to use when handling batch send operations with at least one failed message.
-
Method Details
-
acknowledgementMode
Set the acknowledgement mode for this template. Default isTemplateAcknowledgementMode.ACKNOWLEDGE
- Parameters:
acknowledgementMode
- the mode.- Returns:
- the options instance.
-
sendBatchFailureHandlingStrategy
O sendBatchFailureHandlingStrategy(SendBatchFailureHandlingStrategy sendBatchFailureHandlingStrategy) Set the strategy to use when handling batch send operations with at least one failed message. Default isSendBatchFailureHandlingStrategy.THROW
- Parameters:
sendBatchFailureHandlingStrategy
- the strategy.- Returns:
- the options instance.
-
defaultPollTimeout
Set the default maximum amount of time this template will wait for the maximum number of messages before returning. Default is 10 seconds.- Parameters:
defaultPollTimeout
- the timeout.- Returns:
- the options instance.
-
defaultMaxNumberOfMessages
Set the default maximum number of messages to be retrieved in a single batch. Default is 10.- Parameters:
defaultMaxNumberOfMessages
- the maximum number of messages.- Returns:
- the options instance.
-
defaultPayloadClass
The default class to which this template should convert payloads to.- Parameters:
defaultPayloadClass
- the default payload class.- Returns:
- the options instance.
-
additionalHeaderForReceive
Set a default header to be added to received messages.- Parameters:
name
- the header name.value
- the header value.- Returns:
- the options instance.
-
additionalHeadersForReceive
Set default headers to be added to received messages.- Parameters:
defaultAdditionalHeaders
- the headers.- Returns:
- the options instance.
-