Class AggregatingQueueConsumer

  • All Implemented Interfaces:
    ComponentLifecycle, AggregatingJmsConsumer, AggregatingConsumer<AggregatingJmsConsumeService>

    public class AggregatingQueueConsumer
    extends AggregatingConsumerImpl<AggregatingJmsConsumeService>
    implements AggregatingJmsConsumer
    AggregatingConsumer implementation that allows you to read a separate message(s) from a queue that need to be aggregated with the current message.

    • If the first message is received within the correct timeframe (based on getTimeout()), then additional messages are waited for based on the same timeout. Once the timeout expires then all the messages are aggregated using the configured aggregator.
    • If the first message is not received within the correct timeframe than an exception is thrown
    • In the worst case scenario, then this consumer will take 2*Timeout to process a single message (e.g. you wait 59 seconds for the first message, and then subsequently wait for another minute if the Timeout is 1 minute).

    In the adapter configuration file this class is aliased as aggregating-queue-consumer which is the preferred alternative to the fully qualified classname when building your configuration.