#include <EncryptionContext.h>
It contains encryption and compression information in it using which application can decrypt consumed message with encrypted-payload.
◆ EncryptionContext()
| pulsar::EncryptionContext::EncryptionContext |
( |
const proto::MessageMetadata & | , |
|
|
bool | ) |
This constructor is public to allow in-place construction via std::optional (e.g., std::optional<EncryptionContext>(std::in_place, metadata, false)), but should not be used directly in application code.
◆ algorithm()
| const std::string & pulsar::EncryptionContext::algorithm |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the encryption algorithm used for the message
◆ batchSize()
| int32_t pulsar::EncryptionContext::batchSize |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the batch size if the message is part of a batch, -1 otherwise
◆ compressionType()
| CompressionType pulsar::EncryptionContext::compressionType |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the compression type used for the message
◆ isDecryptionFailed()
| bool pulsar::EncryptionContext::isDecryptionFailed |
( |
| ) |
const |
|
inlinenoexcept |
When the ConsumerConfiguration#getCryptoFailureAction is set to CONSUME, the message will still be returned even if the decryption failed. This method is provided to let users know whether the decryption failed.
- Returns
- whether the decryption failed
◆ keys()
| const KeysType & pulsar::EncryptionContext::keys |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the map of encryption keys used for the message
◆ param()
| const std::string & pulsar::EncryptionContext::param |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the encryption parameter used for the message
◆ uncompressedMessageSize()
| uint32_t pulsar::EncryptionContext::uncompressedMessageSize |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- the uncompressed message size if the message is compressed, 0 otherwise
The documentation for this class was generated from the following file: