diff --git a/kafka-plus-autoconfigure/pom.xml b/kafka-plus-autoconfigure/pom.xml index a7bf2cf..53cb34c 100644 --- a/kafka-plus-autoconfigure/pom.xml +++ b/kafka-plus-autoconfigure/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafka-plus-autoconfigure diff --git a/kafka-plus-core/pom.xml b/kafka-plus-core/pom.xml index 92c0ad5..9e1e3eb 100644 --- a/kafka-plus-core/pom.xml +++ b/kafka-plus-core/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafka-plus-core diff --git a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilder.java b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilder.java index 855321b..af0ea88 100644 --- a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilder.java +++ b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilder.java @@ -183,6 +183,24 @@ default ConsumerBuilder strategy(Class strategy) { // ---------------------------------------------------------------- + /** + * Enhance custom property configs. + * + * @param fx the callback. + * @return {@link ConsumerBuilder} + */ + ConsumerBuilder enhanceProps(Consumer fx); + + /** + * Enhance custom configs. + * + * @param fx the callback. + * @return {@link ConsumerBuilder} + */ + ConsumerBuilder enhanceConfigs(Consumer> fx); + + // ---------------------------------------------------------------- + /** * Check custom property configs. * diff --git a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilderImpl.java b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilderImpl.java index e8d7b3b..e0345f7 100644 --- a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilderImpl.java +++ b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/consumer/ConsumerBuilderImpl.java @@ -164,6 +164,28 @@ public ConsumerBuilder configs(Map configs) { // ---------------------------------------------------------------- + @Override + public ConsumerBuilder enhanceProps(Consumer fx) { + checkNotNull("enhanceProps.fx", fx); + if (null != super.props) { + fx.accept(super.props); + } + + return this; + } + + @Override + public ConsumerBuilder enhanceConfigs(Consumer> fx) { + checkNotNull("enhanceConfigs.fx", fx); + if (null != super.configs) { + fx.accept(super.configs); + } + + return this; + } + + // ---------------------------------------------------------------- + @Override public ConsumerBuilder checkProps(Consumer fx) { checkNotNull("checkProps.fx", fx); diff --git a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/producer/ProducerBuilder.java b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/producer/ProducerBuilder.java index 3c4f27d..0b84862 100644 --- a/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/producer/ProducerBuilder.java +++ b/kafka-plus-core/src/main/java/io/github/photowey/kafka/plus/core/clients/builder/producer/ProducerBuilder.java @@ -274,7 +274,7 @@ default ProducerBuilder deliveryTimeoutMs(long timeout, TimeUnit unit) { * Check custom property configs. * * @param fx the callback. - * @return {@link ConsumerBuilder} + * @return {@link ProducerBuilder} */ ProducerBuilder checkProps(Consumer fx); @@ -282,7 +282,7 @@ default ProducerBuilder deliveryTimeoutMs(long timeout, TimeUnit unit) { * Check custom configs. * * @param fx the callback. - * @return {@link ConsumerBuilder} + * @return {@link ProducerBuilder} */ ProducerBuilder checkConfigs(Consumer> fx); diff --git a/kafka-plus-engine/pom.xml b/kafka-plus-engine/pom.xml index 5861d3e..eadcbc7 100644 --- a/kafka-plus-engine/pom.xml +++ b/kafka-plus-engine/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafka-plus-engine diff --git a/kafka-plus-jackson/pom.xml b/kafka-plus-jackson/pom.xml index 4341233..747e547 100644 --- a/kafka-plus-jackson/pom.xml +++ b/kafka-plus-jackson/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafka-plus-jackson diff --git a/kafka-plus-runtime/pom.xml b/kafka-plus-runtime/pom.xml index fafa99e..169e266 100644 --- a/kafka-plus-runtime/pom.xml +++ b/kafka-plus-runtime/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafka-plus-runtime diff --git a/kafkaplus-spring-boot-starter/pom.xml b/kafkaplus-spring-boot-starter/pom.xml index 13b5afc..3f0168f 100644 --- a/kafkaplus-spring-boot-starter/pom.xml +++ b/kafkaplus-spring-boot-starter/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafkaplus-spring-boot-starter diff --git a/kafkaplus-spring-boot3-starter/pom.xml b/kafkaplus-spring-boot3-starter/pom.xml index 1d6280a..3fd682d 100644 --- a/kafkaplus-spring-boot3-starter/pom.xml +++ b/kafkaplus-spring-boot3-starter/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 kafkaplus-spring-boot3-starter diff --git a/pom.xml b/pom.xml index 6f9c699..db6ec41 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ io.github.photowey kafka-plus - 3.7.0.1.5 + 3.7.0.1.6 pom ${project.groupId}:${project.artifactId}