Enum SubscriberShutdownSettings.ShutdownMode

java.lang.Object
java.lang.Enum<SubscriberShutdownSettings.ShutdownMode>
com.google.cloud.pubsub.v1.SubscriberShutdownSettings.ShutdownMode
All Implemented Interfaces:
Serializable, Comparable<SubscriberShutdownSettings.ShutdownMode>
Enclosing class:
SubscriberShutdownSettings

public static enum SubscriberShutdownSettings.ShutdownMode extends Enum<SubscriberShutdownSettings.ShutdownMode>
Defines the behavior for handling outstanding messages during subscriber shutdown.
  • Enum Constant Details

    • WAIT_FOR_PROCESSING

      public static final SubscriberShutdownSettings.ShutdownMode WAIT_FOR_PROCESSING
      The subscriber will wait for all outstanding messages to be processed (acked or nacked by the user's message receiver) before completing the shutdown.
    • NACK_IMMEDIATELY

      public static final SubscriberShutdownSettings.ShutdownMode NACK_IMMEDIATELY
      The subscriber will immediately nack all outstanding messages and attempt to shut down as quickly as possible. Messages delivered to the user callback but not yet acked/nacked will also be nacked.
  • Method Details

    • values

      public static SubscriberShutdownSettings.ShutdownMode[] 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 SubscriberShutdownSettings.ShutdownMode 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