See #22948. There are 2 locations in code where producers are created in Pulsar Functions and Connectors.
The other location has been ignored for compression type support in #19470 and for crypto config in #8432.
Modifications
Refactor code to remove code duplication.
Create ProducerBuilderFactory class
Move crypto initialization to this class
Move ProducerBuilder configuration to this class
Use ProducerBuilderFactory to create ProducerBuilders
Fixes #22948
Motivation
See #22948. There are 2 locations in code where producers are created in Pulsar Functions and Connectors. The other location has been ignored for compression type support in #19470 and for crypto config in #8432.
Modifications
Documentation
doc
doc-required
doc-not-needed
doc-complete