Class BatchConsumer

  • All Implemented Interfaces:
    Consumer

    public class BatchConsumer
    extends java.lang.Object
    implements Consumer
    • Constructor Summary

      Constructors 
      Constructor Description
      BatchConsumer​(ReceiverFactory messageReceiverFactory, MessageBatchSender sender, MessageBatchFactory batchFactory, OffsetQueue offsetQueue, MessageConverterResolver messageConverterResolver, pl.allegro.tech.hermes.common.message.wrapper.MessageContentWrapper messageContentWrapper, pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics, pl.allegro.tech.hermes.tracker.consumers.Trackers trackers, pl.allegro.tech.hermes.api.Subscription subscription, pl.allegro.tech.hermes.api.Topic topic, pl.allegro.tech.hermes.common.config.ConfigFactory configs)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void commit​(java.util.Set<SubscriptionPartitionOffset> offsetsToCommit)  
      void consume​(java.lang.Runnable signalsInterrupt)  
      pl.allegro.tech.hermes.api.Subscription getSubscription()  
      void initialize()  
      boolean moveOffset​(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset partitionOffset)  
      void tearDown()  
      void updateSubscription​(pl.allegro.tech.hermes.api.Subscription subscription)  
      void updateTopic​(pl.allegro.tech.hermes.api.Topic newTopic)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BatchConsumer

        public BatchConsumer​(ReceiverFactory messageReceiverFactory,
                             MessageBatchSender sender,
                             MessageBatchFactory batchFactory,
                             OffsetQueue offsetQueue,
                             MessageConverterResolver messageConverterResolver,
                             pl.allegro.tech.hermes.common.message.wrapper.MessageContentWrapper messageContentWrapper,
                             pl.allegro.tech.hermes.common.metric.HermesMetrics hermesMetrics,
                             pl.allegro.tech.hermes.tracker.consumers.Trackers trackers,
                             pl.allegro.tech.hermes.api.Subscription subscription,
                             pl.allegro.tech.hermes.api.Topic topic,
                             pl.allegro.tech.hermes.common.config.ConfigFactory configs)
    • Method Detail

      • consume

        public void consume​(java.lang.Runnable signalsInterrupt)
        Specified by:
        consume in interface Consumer
      • tearDown

        public void tearDown()
        Specified by:
        tearDown in interface Consumer
      • updateSubscription

        public void updateSubscription​(pl.allegro.tech.hermes.api.Subscription subscription)
        Specified by:
        updateSubscription in interface Consumer
      • updateTopic

        public void updateTopic​(pl.allegro.tech.hermes.api.Topic newTopic)
        Specified by:
        updateTopic in interface Consumer
      • moveOffset

        public boolean moveOffset​(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset partitionOffset)
        Specified by:
        moveOffset in interface Consumer
      • getSubscription

        public pl.allegro.tech.hermes.api.Subscription getSubscription()
        Specified by:
        getSubscription in interface Consumer