Enum Class ConsumerCryptoFailureAction

java.lang.Object
java.lang.Enum<ConsumerCryptoFailureAction>
org.apache.pulsar.client.api.v5.auth.ConsumerCryptoFailureAction
All Implemented Interfaces:
Serializable, Comparable<ConsumerCryptoFailureAction>, Constable

public enum ConsumerCryptoFailureAction extends Enum<ConsumerCryptoFailureAction>
Action a consumer takes when message decryption fails (e.g. the PrivateKeyProvider cannot be reached, returns no key, or the ciphertext is malformed).
  • Enum Constant Details

    • FAIL

      public static final ConsumerCryptoFailureAction FAIL
      Fail the receive call. The application sees the decryption error and the message stays unacknowledged so it will be redelivered.
    • DISCARD

      public static final ConsumerCryptoFailureAction DISCARD
      Silently acknowledge and skip the message. Useful when the consumer legitimately cannot read some encrypted streams (e.g. a side channel) but should keep moving forward through the rest.
    • CONSUME

      public static final ConsumerCryptoFailureAction CONSUME
      Deliver the message to the application as-is, with the still-encrypted payload. The application can then handle decryption out-of-band.
  • Method Details

    • values

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

      public static ConsumerCryptoFailureAction valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified name
      NullPointerException - if the argument is null