@@ -44,82 +44,82 @@ public class AzureEventHubsProperties extends AzureEventHubsCommonProperties
4444 private final Processor processor = new Processor ();
4545
4646 public Producer buildProducerProperties () {
47- PropertyMapper propertyMapper = PropertyMapper .get ();
47+ PropertyMapper propertyMapper = PropertyMapper .get (). alwaysApplyingWhenNonNull () ;
4848
4949 Producer properties = new Producer ();
5050 AzurePropertiesUtils .mergeAzureCommonProperties (this , this .producer , properties );
5151
52- propertyMapper .from (this .getDomainName ()).always (). to (properties ::setDomainName );
53- propertyMapper .from (this .getNamespace ()).always (). to (properties ::setNamespace );
54- propertyMapper .from (this .getEventHubName ()).always (). to (properties ::setEventHubName );
55- propertyMapper .from (this .getConnectionString ()).always (). to (properties ::setConnectionString );
56- propertyMapper .from (this .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
52+ propertyMapper .from (this .getDomainName ()).to (properties ::setDomainName );
53+ propertyMapper .from (this .getNamespace ()).to (properties ::setNamespace );
54+ propertyMapper .from (this .getEventHubName ()).to (properties ::setEventHubName );
55+ propertyMapper .from (this .getConnectionString ()).to (properties ::setConnectionString );
56+ propertyMapper .from (this .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
5757
58- propertyMapper .from (this .producer .getDomainName ()).always (). to (properties ::setDomainName );
59- propertyMapper .from (this .producer .getNamespace ()).always (). to (properties ::setNamespace );
60- propertyMapper .from (this .producer .getEventHubName ()).always (). to (properties ::setEventHubName );
61- propertyMapper .from (this .producer .getConnectionString ()).always (). to (properties ::setConnectionString );
62- propertyMapper .from (this .producer .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
58+ propertyMapper .from (this .producer .getDomainName ()).to (properties ::setDomainName );
59+ propertyMapper .from (this .producer .getNamespace ()).to (properties ::setNamespace );
60+ propertyMapper .from (this .producer .getEventHubName ()).to (properties ::setEventHubName );
61+ propertyMapper .from (this .producer .getConnectionString ()).to (properties ::setConnectionString );
62+ propertyMapper .from (this .producer .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
6363
6464 return properties ;
6565 }
6666
6767 public Consumer buildConsumerProperties () {
68- PropertyMapper propertyMapper = PropertyMapper .get ();
68+ PropertyMapper propertyMapper = PropertyMapper .get (). alwaysApplyingWhenNonNull () ;
6969
7070 Consumer properties = new Consumer ();
7171 AzurePropertiesUtils .mergeAzureCommonProperties (this , this .consumer , properties );
7272
73- propertyMapper .from (this .getDomainName ()).always (). to (properties ::setDomainName );
74- propertyMapper .from (this .getNamespace ()).always (). to (properties ::setNamespace );
75- propertyMapper .from (this .getEventHubName ()).always (). to (properties ::setEventHubName );
76- propertyMapper .from (this .getConnectionString ()).always (). to (properties ::setConnectionString );
77- propertyMapper .from (this .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
73+ propertyMapper .from (this .getDomainName ()).to (properties ::setDomainName );
74+ propertyMapper .from (this .getNamespace ()).to (properties ::setNamespace );
75+ propertyMapper .from (this .getEventHubName ()).to (properties ::setEventHubName );
76+ propertyMapper .from (this .getConnectionString ()).to (properties ::setConnectionString );
77+ propertyMapper .from (this .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
7878
79- propertyMapper .from (this .consumer .getDomainName ()).always (). to (properties ::setDomainName );
80- propertyMapper .from (this .consumer .getNamespace ()).always (). to (properties ::setNamespace );
81- propertyMapper .from (this .consumer .getEventHubName ()).always (). to (properties ::setEventHubName );
82- propertyMapper .from (this .consumer .getConnectionString ()).always (). to (properties ::setConnectionString );
83- propertyMapper .from (this .consumer .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
84- propertyMapper .from (this .consumer .getPrefetchCount ()).always (). to (properties ::setPrefetchCount );
85- propertyMapper .from (this .consumer .getConsumerGroup ()).always (). to (properties ::setConsumerGroup );
79+ propertyMapper .from (this .consumer .getDomainName ()).to (properties ::setDomainName );
80+ propertyMapper .from (this .consumer .getNamespace ()).to (properties ::setNamespace );
81+ propertyMapper .from (this .consumer .getEventHubName ()).to (properties ::setEventHubName );
82+ propertyMapper .from (this .consumer .getConnectionString ()).to (properties ::setConnectionString );
83+ propertyMapper .from (this .consumer .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
84+ propertyMapper .from (this .consumer .getPrefetchCount ()).to (properties ::setPrefetchCount );
85+ propertyMapper .from (this .consumer .getConsumerGroup ()).to (properties ::setConsumerGroup );
8686
8787 return properties ;
8888 }
8989
9090 public Processor buildProcessorProperties () {
91- PropertyMapper propertyMapper = PropertyMapper .get ();
91+ PropertyMapper propertyMapper = PropertyMapper .get (). alwaysApplyingWhenNonNull () ;
9292
9393 Processor properties = new Processor ();
9494 AzurePropertiesUtils .mergeAzureCommonProperties (this , this .processor , properties );
9595
96- propertyMapper .from (this .getDomainName ()).always (). to (properties ::setDomainName );
97- propertyMapper .from (this .getNamespace ()).always (). to (properties ::setNamespace );
98- propertyMapper .from (this .getEventHubName ()).always (). to (properties ::setEventHubName );
99- propertyMapper .from (this .getConnectionString ()).always (). to (properties ::setConnectionString );
100- propertyMapper .from (this .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
101-
102- propertyMapper .from (this .processor .getDomainName ()).always (). to (properties ::setDomainName );
103- propertyMapper .from (this .processor .getNamespace ()).always (). to (properties ::setNamespace );
104- propertyMapper .from (this .processor .getEventHubName ()).always (). to (properties ::setEventHubName );
105- propertyMapper .from (this .processor .getConnectionString ()).always (). to (properties ::setConnectionString );
106- propertyMapper .from (this .processor .getCustomEndpointAddress ()).always (). to (properties ::setCustomEndpointAddress );
107- propertyMapper .from (this .processor .getPrefetchCount ()).always (). to (properties ::setPrefetchCount );
108- propertyMapper .from (this .processor .getConsumerGroup ()).always (). to (properties ::setConsumerGroup );
109-
110- propertyMapper .from (this .processor .trackLastEnqueuedEventProperties ).always (). to (properties ::setTrackLastEnqueuedEventProperties );
96+ propertyMapper .from (this .getDomainName ()).to (properties ::setDomainName );
97+ propertyMapper .from (this .getNamespace ()).to (properties ::setNamespace );
98+ propertyMapper .from (this .getEventHubName ()).to (properties ::setEventHubName );
99+ propertyMapper .from (this .getConnectionString ()).to (properties ::setConnectionString );
100+ propertyMapper .from (this .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
101+
102+ propertyMapper .from (this .processor .getDomainName ()).to (properties ::setDomainName );
103+ propertyMapper .from (this .processor .getNamespace ()).to (properties ::setNamespace );
104+ propertyMapper .from (this .processor .getEventHubName ()).to (properties ::setEventHubName );
105+ propertyMapper .from (this .processor .getConnectionString ()).to (properties ::setConnectionString );
106+ propertyMapper .from (this .processor .getCustomEndpointAddress ()).to (properties ::setCustomEndpointAddress );
107+ propertyMapper .from (this .processor .getPrefetchCount ()).to (properties ::setPrefetchCount );
108+ propertyMapper .from (this .processor .getConsumerGroup ()).to (properties ::setConsumerGroup );
109+
110+ propertyMapper .from (this .processor .trackLastEnqueuedEventProperties ).to (properties ::setTrackLastEnqueuedEventProperties );
111111 propertyMapper .from (this .processor .initialPartitionEventPosition ).when (c -> !CollectionUtils .isEmpty (c ))
112- .always (). to (m -> {
112+ .to (m -> {
113113 Map <String , Processor .StartPosition > eventPositionMap = m .entrySet ()
114114 .stream ()
115115 .filter (entry -> entry .getValue () != null )
116116 .collect (Collectors .toMap (Map .Entry ::getKey , Map .Entry ::getValue ));
117117 properties .getInitialPartitionEventPosition ().putAll (eventPositionMap );
118118 });
119- propertyMapper .from (this .processor .batch .getMaxSize ()).always (). to (properties .batch ::setMaxSize );
120- propertyMapper .from (this .processor .batch .getMaxWaitTime ()).always (). to (properties .batch ::setMaxWaitTime );
121- propertyMapper .from (this .processor .loadBalancing .getStrategy ()).always (). to (properties .loadBalancing ::setStrategy );
122- propertyMapper .from (this .processor .loadBalancing .getUpdateInterval ()).always (). to (properties .loadBalancing ::setUpdateInterval );
119+ propertyMapper .from (this .processor .batch .getMaxSize ()).to (properties .batch ::setMaxSize );
120+ propertyMapper .from (this .processor .batch .getMaxWaitTime ()).to (properties .batch ::setMaxWaitTime );
121+ propertyMapper .from (this .processor .loadBalancing .getStrategy ()).to (properties .loadBalancing ::setStrategy );
122+ propertyMapper .from (this .processor .loadBalancing .getUpdateInterval ()).to (properties .loadBalancing ::setUpdateInterval );
123123
124124 AzurePropertiesUtils .mergeAzureCommonProperties (properties , this .processor .getCheckpointStore (), properties .checkpointStore );
125125 BeanUtils .copyProperties (this .processor .checkpointStore , properties .checkpointStore );
0 commit comments