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 Details

    • acknowledgementMode

      O acknowledgementMode(TemplateAcknowledgementMode acknowledgementMode)
      Set the acknowledgement mode for this template. Default is TemplateAcknowledgementMode.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 is SendBatchFailureHandlingStrategy.THROW
      Parameters:
      sendBatchFailureHandlingStrategy - the strategy.
      Returns:
      the options instance.
    • defaultPollTimeout

      O defaultPollTimeout(Duration 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

      O defaultMaxNumberOfMessages(Integer 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

      O defaultPayloadClass(Class<?> defaultPayloadClass)
      The default class to which this template should convert payloads to.
      Parameters:
      defaultPayloadClass - the default payload class.
      Returns:
      the options instance.
    • additionalHeaderForReceive

      O additionalHeaderForReceive(String name, Object value)
      Set a default header to be added to received messages.
      Parameters:
      name - the header name.
      value - the header value.
      Returns:
      the options instance.
    • additionalHeadersForReceive

      O additionalHeadersForReceive(Map<String,Object> defaultAdditionalHeaders)
      Set default headers to be added to received messages.
      Parameters:
      defaultAdditionalHeaders - the headers.
      Returns:
      the options instance.