Class JmsDestinationPollingSource

All Implemented Interfaces:
Aware, BeanFactoryAware, BeanNameAware, DisposableBean, InitializingBean, MessageSource<Object>, IntegrationPattern, NamedComponent, IntegrationInboundManagement, IntegrationManagement

public class JmsDestinationPollingSource extends AbstractMessageSource<Object>
A source for receiving JMS Messages with a polling listener. This source is only recommended for very low message volume. Otherwise, the JmsMessageDrivenEndpoint that uses Spring's MessageListener container support is a better option.
Author:
Mark Fisher, Oleg Zhurakousky, Artem Bilan
  • Constructor Details

    • JmsDestinationPollingSource

      public JmsDestinationPollingSource(JmsTemplate jmsTemplate)
  • Method Details

    • setDestination

      public void setDestination(Destination destination)
    • setDestinationName

      public void setDestinationName(String destinationName)
    • setExtractPayload

      public void setExtractPayload(boolean extractPayload)
      The flag to indicate if we should extract body from JMS Message, or use the received JMS Message as Message payload.
      Parameters:
      extractPayload - the boolean flag. Defaults to true.
      Since:
      3.0.7
    • getComponentType

      public String getComponentType()
    • setMessageSelector

      public void setMessageSelector(String messageSelector)
      Specify a JMS Message Selector expression to use when receiving Messages.
      Parameters:
      messageSelector - The message selector.
    • setHeaderMapper

      public void setHeaderMapper(JmsHeaderMapper headerMapper)
    • setSessionAcknowledgeMode

      public void setSessionAcknowledgeMode(String sessionAcknowledgeMode)
    • onInit

      protected void onInit()
      Overrides:
      onInit in class AbstractExpressionEvaluator
    • doReceive

      protected Object doReceive()
      Will receive a JMS Message converting and returning it as a Spring Integration Message. This method will also use the current JmsHeaderMapper instance to map JMS properties to the MessageHeaders.
      Specified by:
      doReceive in class AbstractMessageSource<Object>
      Returns:
      The value returned.