Interface ReaderDecryptFailListener<T>

All Superinterfaces:
Serializable

@Public @Stable public interface ReaderDecryptFailListener<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 ReaderBuilder.readerListener(ReaderListener) and cannot be used with ReaderBuilder.cryptoFailureAction(ConsumerCryptoFailureAction).

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    received(Reader<T> reader, 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(Reader<T> reader, 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 reader

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

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

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

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