Interface Consumer

All Known Implementing Classes:
BatchConsumer, SerialConsumer

public interface Consumer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    consume(Runnable signalsInterrupt)
    Consume **must** make sure that interrupted status is restored as it is needed for stopping unhealthy consumers.
    pl.allegro.tech.hermes.api.Subscription
     
    void
     
    boolean
    moveOffset(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset subscriptionPartitionOffset)
     
    void
     
    void
    updateSubscription(pl.allegro.tech.hermes.api.Subscription subscription)
     
    void
    updateTopic(pl.allegro.tech.hermes.api.Topic topic)
     
  • Method Details

    • consume

      void consume(Runnable signalsInterrupt)
      Consume **must** make sure that interrupted status is restored as it is needed for stopping unhealthy consumers. Swallowing the interrupt by consume or any of its dependencies will result in consumer being marked as unhealthy and will prevent commits despite messages being sent to subscribers.
    • initialize

      void initialize()
    • tearDown

      void tearDown()
    • updateSubscription

      void updateSubscription(pl.allegro.tech.hermes.api.Subscription subscription)
    • updateTopic

      void updateTopic(pl.allegro.tech.hermes.api.Topic topic)
    • commit

      void commit(Set<SubscriptionPartitionOffset> offsets)
    • moveOffset

      boolean moveOffset(pl.allegro.tech.hermes.common.kafka.offset.PartitionOffset subscriptionPartitionOffset)
    • getSubscription

      pl.allegro.tech.hermes.api.Subscription getSubscription()