Class AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S,E>,E extends AbstractAmqpOutboundEndpoint>

java.lang.Object
org.springframework.integration.dsl.IntegrationComponentSpec<S,H>
org.springframework.integration.dsl.MessageHandlerSpec<S,E>
org.springframework.integration.amqp.dsl.AmqpBaseOutboundEndpointSpec<S,E>
Type Parameters:
S - the target AmqpBaseOutboundEndpointSpec implementation type.
E - the target AbstractAmqpOutboundEndpoint implementation type.
All Implemented Interfaces:
DisposableBean, FactoryBean<E>, InitializingBean, Lifecycle, Phased, SmartLifecycle
Direct Known Subclasses:
AmqpAsyncOutboundGatewaySpec, AmqpOutboundEndpointSpec

public abstract class AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S,E>,E extends AbstractAmqpOutboundEndpoint> extends MessageHandlerSpec<S,E>
Since:
5.0
Author:
Artem Bilan, Gary Russell
  • Field Details

  • Constructor Details

    • AmqpBaseOutboundEndpointSpec

      public AmqpBaseOutboundEndpointSpec()
  • Method Details

    • headerMapper

      public S headerMapper(AmqpHeaderMapper headerMapper)
      Set a custom AmqpHeaderMapper for mapping request and reply headers.
      Parameters:
      headerMapper - the AmqpHeaderMapper to use.
      Returns:
      the spec
    • defaultDeliveryMode

      public S defaultDeliveryMode(MessageDeliveryMode defaultDeliveryMode)
      Set the default delivery mode.
      Parameters:
      defaultDeliveryMode - the delivery mode.
      Returns:
      the spec
    • routingKey

      public S routingKey(String routingKey)
      Configure an AMQP routing key for sending messages.
      Parameters:
      routingKey - the routing key to use
      Returns:
      the spec
    • routingKeyExpression

      public S routingKeyExpression(String routingKeyExpression)
      A SpEL expression to evaluate routing key at runtime.
      Parameters:
      routingKeyExpression - the expression to use.
      Returns:
      the spec
    • routingKeyFunction

      public S routingKeyFunction(Function<Message<?>,String> routingKeyFunction)
      A function to evaluate routing key at runtime.
      Parameters:
      routingKeyFunction - the Function to use.
      Returns:
      the spec
    • routingKeyExpression

      public S routingKeyExpression(Expression routingKeyExpression)
      A SpEL expression to evaluate routing key at runtime.
      Parameters:
      routingKeyExpression - the expression to use.
      Returns:
      the spec
    • returnChannel

      public S returnChannel(MessageChannel returnChannel)
      Set the channel to which returned messages are sent.
      Parameters:
      returnChannel - the channel.
      Returns:
      the spec
    • confirmAckChannel

      public S confirmAckChannel(MessageChannel ackChannel)
      Set the channel to which acks are send (publisher confirms).
      Parameters:
      ackChannel - the channel.
      Returns:
      the spec
    • exchangeName

      public S exchangeName(String exchangeName)
      Configure an AMQP exchange name for sending messages.
      Parameters:
      exchangeName - the exchange name for sending messages.
      Returns:
      the spec
    • exchangeNameExpression

      public S exchangeNameExpression(String exchangeNameExpression)
      Configure a SpEL expression to evaluate an exchange name at runtime.
      Parameters:
      exchangeNameExpression - the expression to use.
      Returns:
      the spec
    • exchangeNameFunction

      public S exchangeNameFunction(Function<Message<?>,String> exchangeNameFunction)
      Configure a Function to evaluate an exchange name at runtime.
      Parameters:
      exchangeNameFunction - the function to use.
      Returns:
      the spec
    • exchangeNameExpression

      public S exchangeNameExpression(Expression exchangeNameExpression)
      Configure a SpEL expression to evaluate an exchange name at runtime.
      Parameters:
      exchangeNameExpression - the expression to use.
      Returns:
      the spec
    • confirmNackChannel

      public S confirmNackChannel(MessageChannel nackChannel)
      Set the channel to which nacks are send (publisher confirms).
      Parameters:
      nackChannel - the channel.
      Returns:
      the spec
    • confirmCorrelationExpression

      public S confirmCorrelationExpression(String confirmCorrelationExpression)
      Set a SpEL expression to evaluate confirm correlation at runtime.
      Parameters:
      confirmCorrelationExpression - the expression to use.
      Returns:
      the spec
    • confirmCorrelationFunction

      public S confirmCorrelationFunction(Function<Message<?>,Object> confirmCorrelationFunction)
      Set a Function to evaluate confirm correlation at runtime.
      Parameters:
      confirmCorrelationFunction - the function to use.
      Returns:
      the spec
    • confirmCorrelationExpression

      public S confirmCorrelationExpression(Expression confirmCorrelationExpression)
      Set a SpEL expression to evaluate confirm correlation at runtime.
      Parameters:
      confirmCorrelationExpression - the expression to use.
      Returns:
      the spec
    • mappedRequestHeaders

      public S mappedRequestHeaders(String... headers)
      Provide the header names that should be mapped from a request to a MessageHeaders.
      Parameters:
      headers - The request header names.
      Returns:
      the spec
    • mappedReplyHeaders

      public S mappedReplyHeaders(String... headers)
      Provide the header names that should be mapped to a response from a MessageHeaders.
      Parameters:
      headers - The reply header names.
      Returns:
      the spec
    • headersMappedLast

      public S headersMappedLast(boolean headersLast)
      Determine whether the headers are mapped before the message is converted, or afterwards.
      Parameters:
      headersLast - true to map headers last.
      Returns:
      the spec.
      See Also:
    • lazyConnect

      public S lazyConnect(boolean lazyConnect)
      Set to false to attempt to connect during endpoint start.
      Parameters:
      lazyConnect - the lazyConnect to set.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • delay

      public S delay(int delay)
      Set the value to set in the x-delay header when using the RabbitMQ delayed message exchange plugin.
      Parameters:
      delay - the delay.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • delayFunction

      public S delayFunction(Function<Message<?>,Integer> delayFunction)
      Set the function to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
      Parameters:
      delayFunction - the function to evaluate the value for the x-delay header.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • delayExpression

      public S delayExpression(Expression delayExpression)
      Set the SpEL expression to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
      Parameters:
      delayExpression - the expression.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • delayExpression

      public S delayExpression(String delayExpression)
      Set the SpEL expression to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
      Parameters:
      delayExpression - the expression.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • errorMessageStrategy

      public S errorMessageStrategy(ErrorMessageStrategy errorMessageStrategy)
      Set the error message strategy to use for returned (or negatively confirmed) messages.
      Parameters:
      errorMessageStrategy - the strategy.
      Returns:
      the spec.
      Since:
      5.0.2
      See Also:
    • confirmTimeout

      public S confirmTimeout(long timeout)
      Set a timeout after which a nack will be synthesized if no publisher confirm has been received within that time. Missing confirms will be checked every 50% of this value so the synthesized nack will be sent between 1x and 1.5x this timeout.
      Parameters:
      timeout - the approximate timeout.
      Returns:
      the spec.
      Since:
      5.3