pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[fix][client]Failure to load encryption key should not prevent creation of producer on client side

Open vraulji567 opened this issue 7 months ago • 3 comments

Fixes https://github.com/apache/pulsar/issues/24280

Motivation

Failure to load the encryption public key while creating the producer creates a producer on the server side but returns an exception on client side. If the client application is retrying producer creation due to the failure on client side, this will create too many producer connection on the broker side and can bring down the broker. I expected that the producer creation to be successful (client should not see failure if there is a failure to load the encryption key) and eventually send should fail with the failure to load the encryption key.

Modifications

  • Updated the producer creation to not throw an exception when there is a failure to load the encryption key.

Verifying this change

  • [x] Added tests to verify the change

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • [ ] Dependencies (add or upgrade a dependency)
  • [ ] The public API
  • [ ] The schema
  • [ ] The default values of configurations
  • [ ] The threading model
  • [ ] The binary protocol
  • [ ] The REST endpoints
  • [ ] The admin CLI options
  • [ ] The metrics
  • [ ] Anything that affects deployment

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository:

vraulji567 avatar May 12 '25 14:05 vraulji567

Can anyone review my PR?

vraulji567 avatar May 15 '25 13:05 vraulji567

@vraulji567 Could you fix the failed tests?

BewareMyPower avatar Jun 11 '25 12:06 BewareMyPower

@vraulji567 Could you fix the failed tests?

Fixed the failed tests.

vraulji567 avatar Jun 11 '25 19:06 vraulji567

Can someone guide me on why the checks are failing? Also can I request a review on this?

vraulji567 avatar Sep 26 '25 16:09 vraulji567