-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change the setClientFactoryCustomizers to addClientFactoryCustomizer #27775
Change the setClientFactoryCustomizers to addClientFactoryCustomizer #27775
Conversation
API changes have been detected in |
API changes have been detected in |
public void setProducerFactoryCustomizers(List<EventHubsProducerFactoryCustomizer> producerFactoryCustomizers) { | ||
this.producerFactoryCustomizers = producerFactoryCustomizers; | ||
public void addProducerFactoryCustomizer(EventHubsProducerFactoryCustomizer producerFactoryCustomizer) { | ||
if (producerFactoryCustomizer != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will producerFactoryCustomizer
be null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this could be call by users
this.producerFactoryCustomizers = producerFactoryCustomizers; | ||
public void addProducerFactoryCustomizer(EventHubsProducerFactoryCustomizer producerFactoryCustomizer) { | ||
if (producerFactoryCustomizer != null) { | ||
this.producerFactoryCustomizers.add(producerFactoryCustomizer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to consider thread-safe here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for now
@@ -110,8 +108,8 @@ public EventHubsMessageChannelBinder eventHubBinder(EventHubsChannelProvisioner | |||
binder.setBindingProperties(bindingProperties); | |||
binder.setNamespaceProperties(namespaceProperties.getIfAvailable()); | |||
checkpointStores.ifAvailable(binder::setCheckpointStore); | |||
binder.setProducerFactoryCustomizers(producerFactoryCustomizers.orderedStream().collect(Collectors.toList())); | |||
binder.setProcessorFactoryCustomizers(processorFactoryCustomizers.orderedStream().collect(Collectors.toList())); | |||
producerFactoryCustomizers.orderedStream().forEach(binder::addProducerFactoryCustomizer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding addProducerFactoryCustomizers
to support add multiple customizers one time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not for now, but maybe in later versions
/azp run java - spring - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR will change the API of
setClientFactoryCustomizers(List<ClientFactoryCustomizer> customizers)
toaddClientFactoryCustomizer(ClientFactoryCustomizer customizer)
so the autoconfigured client factory customizers will still be available.