[feat][client] Support configure MessageCrypto in ProducerBuilder#19939
Conversation
Signed-off-by: tison <wander4096@gmail.com>
000889e to
56b048d
Compare
|
LGTM |
RobertIndie
left a comment
There was a problem hiding this comment.
I think it was the lack of testing that caused the missing exposure of this field to the ProducerBuilder. Better to add a test to cover this case.
|
@RobertIndie I was thinking of it, but the only test case comes to my mind is some getter/setter tests (i.e., we configure the message crypoto object, and verify that it's configured). I can add some if asked. |
RobertIndie
left a comment
There was a problem hiding this comment.
Just found out that the consumer also lacks of function test of message crypto. I'm +1 for this PR.
Yep. This is a standard builder pattern and a complement. We don't test builders but upper-layer logic, do we? |
eolivelli
left a comment
There was a problem hiding this comment.
I support this patch and I don't think it requires a PIP.
But I think that we need to need some test at least to prevent that someone changes the API in the future.
Please also add the test for the similar method on the ConsumerBuilder
Signed-off-by: tison <wander4096@gmail.com>
|
@eolivelli e73ad35 add basic set-and-get tests to prevent API breaking. |
|
Thanks for your reviews! Merging... |
|
@tisonkun thanks for introducing this improvement! I see this PR is labeled with
Thank you! |
…ache#19939) Signed-off-by: tison <wander4096@gmail.com> (cherry picked from commit 0214745)
This closes #19139.
Motivation
It's a lightweight feature alignment. Since it somehow touches public API, I don't know if it requires a PIP. It may not be, just trivial.
Modifications
Support configure MessageCrypto in ProducerBuilder.
We already test this field but never pass or expose the config:
pulsar/pulsar-client/src/main/java/org/apache/pulsar/client/impl/ProducerImpl.java
Lines 207 to 219 in 32ad906
Verifying this change
Trivial.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
Maybe I should update some doc, but I'm not sure where is related doc.
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: