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

java.lang.Object
org.springframework.beans.factory.config.AbstractFactoryBean<T>
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:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<E>, org.springframework.beans.factory.InitializingBean, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
Direct Known Subclasses:
AmqpAsyncOutboundGatewaySpec, AmqpOutboundEndpointSpec

public abstract class AmqpBaseOutboundEndpointSpec<S extends AmqpBaseOutboundEndpointSpec<S,E>,E extends AbstractAmqpOutboundEndpoint> extends org.springframework.integration.dsl.MessageHandlerSpec<S,E>
The base MessageHandlerSpec for AbstractAmqpOutboundEndpoints.
Since:
5.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final DefaultAmqpHeaderMapper
     

    Fields inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    PARSER, target

    Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    logger

    Fields inherited from interface org.springframework.beans.factory.FactoryBean

    OBJECT_TYPE_ATTRIBUTE

    Fields inherited from interface org.springframework.context.SmartLifecycle

    DEFAULT_PHASE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    confirmAckChannel(org.springframework.messaging.MessageChannel ackChannel)
    Set the channel to which acks are send (publisher confirms).
    confirmCorrelationExpression(String confirmCorrelationExpression)
    Set a SpEL expression to evaluate confirm correlation at runtime.
    confirmCorrelationExpression(org.springframework.expression.Expression confirmCorrelationExpression)
    Set a SpEL expression to evaluate confirm correlation at runtime.
    confirmCorrelationFunction(Function<org.springframework.messaging.Message<?>,Object> confirmCorrelationFunction)
    Set a Function to evaluate confirm correlation at runtime.
    confirmNackChannel(org.springframework.messaging.MessageChannel nackChannel)
    Set the channel to which nacks are send (publisher confirms).
    confirmTimeout(long timeout)
    Set a timeout after which a nack will be synthesized if no publisher confirm has been received within that time.
    defaultDeliveryMode(org.springframework.amqp.core.MessageDeliveryMode defaultDeliveryMode)
    Set the default delivery mode.
    delay(int delay)
    Set the value to set in the x-delay header when using the RabbitMQ delayed message exchange plugin.
    delayExpression(String delayExpression)
    Set the SpEL expression to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
    delayExpression(org.springframework.expression.Expression delayExpression)
    Set the SpEL expression to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
    delayFunction(Function<org.springframework.messaging.Message<?>,Integer> delayFunction)
    Set the function to calculate the x-delay header when using the RabbitMQ delayed message exchange plugin.
    errorMessageStrategy(org.springframework.integration.support.ErrorMessageStrategy errorMessageStrategy)
    Set the error message strategy to use for returned (or negatively confirmed) messages.
    exchangeName(String exchangeName)
    Configure an AMQP exchange name for sending messages.
    exchangeNameExpression(String exchangeNameExpression)
    Configure a SpEL expression to evaluate an exchange name at runtime.
    exchangeNameExpression(org.springframework.expression.Expression exchangeNameExpression)
    Configure a SpEL expression to evaluate an exchange name at runtime.
    exchangeNameFunction(Function<org.springframework.messaging.Message<?>,String> exchangeNameFunction)
    Configure a Function to evaluate an exchange name at runtime.
    Set a custom AmqpHeaderMapper for mapping request and reply headers.
    headersMappedLast(boolean headersLast)
    Determine whether the headers are mapped before the message is converted, or afterwards.
    lazyConnect(boolean lazyConnect)
    Set to false to attempt to connect during endpoint start.
    Provide the header names that should be mapped to a response from a MessageHeaders.
    Provide the header names that should be mapped from a request to a MessageHeaders.
    returnChannel(org.springframework.messaging.MessageChannel returnChannel)
    Set the channel to which returned messages are sent.
    routingKey(String routingKey)
    Configure an AMQP routing key for sending messages.
    routingKeyExpression(String routingKeyExpression)
    A SpEL expression to evaluate routing key at runtime.
    routingKeyExpression(org.springframework.expression.Expression routingKeyExpression)
    A SpEL expression to evaluate routing key at runtime.
    routingKeyFunction(Function<org.springframework.messaging.Message<?>,String> routingKeyFunction)
    A function to evaluate routing key at runtime.

    Methods inherited from class org.springframework.integration.dsl.IntegrationComponentSpec

    _this, createInstance, destroyInstance, doGet, get, getId, getObjectType, getPhase, id, isAutoStartup, isRunning, start, stop, stop

    Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

    afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingleton

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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(org.springframework.amqp.core.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<org.springframework.messaging.Message<?>,String> routingKeyFunction)
      A function to evaluate routing key at runtime.
      Parameters:
      routingKeyFunction - the Function to use.
      Returns:
      the spec
    • routingKeyExpression

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

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

      public S confirmAckChannel(org.springframework.messaging.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<org.springframework.messaging.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(org.springframework.expression.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(org.springframework.messaging.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<org.springframework.messaging.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(org.springframework.expression.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<org.springframework.messaging.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(org.springframework.expression.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(org.springframework.integration.support.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