Enum StreamOptions.OnFailure

java.lang.Object
java.lang.Enum<StreamOptions.OnFailure>
org.acemq.amqp.core.StreamOptions.OnFailure
All Implemented Interfaces:
Serializable, Comparable<StreamOptions.OnFailure>
Enclosing class:
StreamOptions

public static enum StreamOptions.OnFailure extends Enum<StreamOptions.OnFailure>
What to do when a handler throws. There is no third answer a stream can give.
  • Enum Constant Details

    • STOP

      public static final StreamOptions.OnFailure STOP
      Stop the consumer and record why.

      The default, because a stream is usually read to build something — a projection, a report, a search index — and a gap in that is invisible once it exists. Stopping is loud, and the offset is still there to resume from once the handler is fixed.

    • SKIP

      public static final StreamOptions.OnFailure SKIP
      Pass over the message, count it, and carry on.

      Right when lateness is worse than completeness, such as a live dashboard. Wrong whenever anything downstream is derived from every message, because nothing will ever say what was missed.

  • Method Details

    • values

      public static StreamOptions.OnFailure[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static StreamOptions.OnFailure valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null