Interface DecryptFailListener<T>

All Superinterfaces:
Serializable

@Public @Stable public interface DecryptFailListener<T> extends Serializable
A listener that is called when message decryption fails.

This listener is invoked when receives an encrypted message and cannot be decrypted successfully, either because no CryptoKeyReader is configured or the configured CryptoKeyReader cannot decrypt the message. This allows applications to handle decryption failures separately from normal message processing.

This listener must be used together with a MessageListener and cannot be used with ConsumerCryptoFailureAction.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    received(Consumer<T> consumer, Message<T> msg)
    This method is called whenever a new encrypted message is received and cannot be decrypted successfully by CryptoKeyReader
  • Method Details

    • received

      void received(Consumer<T> consumer, Message<T> msg)
      This method is called whenever a new encrypted message is received and cannot be decrypted successfully by CryptoKeyReader

      Messages are guaranteed to be delivered in order and from the same thread for a single consumer

      This method will only be called once for each encrypted message.

      Application is responsible for acknowledging the message by calling any of the consumer acknowledgement methods if needed.

      Application is responsible for handling any exception that could be thrown while processing the undecryptable message.

      Parameters:
      consumer - the consumer that received the undecryptable message
      msg - the encrypted message object that failed decryption