Class ConsumerPolicy

java.lang.Object
org.nuxeo.lib.stream.pattern.consumer.ConsumerPolicy
Direct Known Subclasses:
DocumentConsumerPolicy

public class ConsumerPolicy extends Object
The consumer policy drive the consumer pool and runner.
Since:
9.1
  • Field Details

    • DEFAULT_NAME

      public static final String DEFAULT_NAME
      See Also:
    • NO_RETRY

      public static final net.jodah.failsafe.RetryPolicy<Object> NO_RETRY
    • BOUNDED

      public static final ConsumerPolicy BOUNDED
      Consumer policy that stop on starvation and failure.
    • BOUNDED_RETRY

      public static final ConsumerPolicy BOUNDED_RETRY
    • UNBOUNDED

      public static final ConsumerPolicy UNBOUNDED
      Consumer policy that wait for ever for new message and skip failure.
    • UNBOUNDED_RETRY

      public static final ConsumerPolicy UNBOUNDED_RETRY
    • batchPolicy

      protected final BatchPolicy batchPolicy
    • retryPolicy

      protected final net.jodah.failsafe.RetryPolicy<Object> retryPolicy
    • skipFailure

      protected final boolean skipFailure
    • waitMessageTimeout

      protected final Duration waitMessageTimeout
    • startOffset

      protected final ConsumerPolicy.StartOffset startOffset
    • salted

      protected final boolean salted
    • name

      protected final String name
    • maxThreads

      protected final short maxThreads
  • Constructor Details

  • Method Details

    • getBatchPolicy

      public BatchPolicy getBatchPolicy()
    • getRetryPolicy

      public net.jodah.failsafe.RetryPolicy<Object> getRetryPolicy()
    • continueOnFailure

      public boolean continueOnFailure()
    • getWaitMessageTimeout

      public Duration getWaitMessageTimeout()
    • getStartOffset

      public ConsumerPolicy.StartOffset getStartOffset()
    • isSalted

      public boolean isSalted()
    • getName

      public String getName()
    • getMaxThreads

      public short getMaxThreads()
    • builder

      public static ConsumerPolicyBuilder builder()
    • toString

      public String toString()
      Overrides:
      toString in class Object