Skip to content

[Client] Add MessageCrypto setting in ProducerBuilder #19139

@syhily

Description

@syhily

Search before asking

  • I searched in the issues and found nothing similar.

Version

2.10.2

Minimal reproduce step

Pulsar add the MessageCrypto support, add enabled it in ProducerConfigurationData, but Pulsar didn't expose it in ProducerBuilder as the ConsumerBuilder.messageCrypto(MessageCrypto messageCrypto)

What did you expect to see?

Add a new method for setting the MessageCrypto in ProducerBuilder.

/**
 * Sets a {@link MessageCrypto}.
 *
 * <p>Contains methods to encrypt/decrypt message for End to End Encryption.
 *
 * @param messageCrypto
 *            MessageCrypto object
 * @return the consumer builder instance
 */
ProducerBuilder<T> messageCrypto(MessageCrypto messageCrypto);
@Override
public ProducerBuilder<T> messageCrypto(MessageCrypto messageCrypto) {
    conf.setMessageCrypto(messageCrypto);
    return this;
}

What did you see instead?

Not applicable.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

type/enhancementThe enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions