-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45816 from mcruzdev/config-kafka-client
Convert kafka-client extension to use @ConfigMapping
- Loading branch information
Showing
8 changed files
with
56 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 16 additions & 11 deletions
27
...ent/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaBuildTimeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,49 @@ | ||
package io.quarkus.kafka.client.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigDocSection; | ||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
import io.smallrye.config.WithDefault; | ||
import io.smallrye.config.WithName; | ||
|
||
@ConfigRoot(name = "kafka", phase = ConfigPhase.BUILD_TIME) | ||
public class KafkaBuildTimeConfig { | ||
@ConfigMapping(prefix = "quarkus.kafka") | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
public interface KafkaBuildTimeConfig { | ||
/** | ||
* Whether a health check is published in case the smallrye-health extension is present. | ||
* <p> | ||
* If you enable the health check, you must specify the `kafka.bootstrap.servers` property. | ||
*/ | ||
@ConfigItem(name = "health.enabled", defaultValue = "false") | ||
public boolean healthEnabled; | ||
@WithName("health.enabled") | ||
@WithDefault("false") | ||
boolean healthEnabled(); | ||
|
||
/** | ||
* Whether to enable Snappy in native mode. | ||
* <p> | ||
* Note that Snappy requires GraalVM 21+ and embeds a native library in the native executable. | ||
* This library is unpacked and loaded when the application starts. | ||
*/ | ||
@ConfigItem(name = "snappy.enabled", defaultValue = "false") | ||
public boolean snappyEnabled; | ||
@WithName("snappy.enabled") | ||
@WithDefault("false") | ||
boolean snappyEnabled(); | ||
|
||
/** | ||
* Whether to load the Snappy native library from the shared classloader. | ||
* This setting is only used in tests if the tests are using different profiles, which would lead to | ||
* unsatisfied link errors when loading Snappy. | ||
*/ | ||
@ConfigItem(name = "snappy.load-from-shared-classloader", defaultValue = "false") | ||
public boolean snappyLoadFromSharedClassLoader; | ||
@WithName("snappy.load-from-shared-classloader") | ||
@WithDefault("false") | ||
boolean snappyLoadFromSharedClassLoader(); | ||
|
||
/** | ||
* Dev Services. | ||
* <p> | ||
* Dev Services allows Quarkus to automatically start Kafka in dev and test mode. | ||
*/ | ||
@ConfigItem | ||
@ConfigDocSection(generated = true) | ||
public KafkaDevServicesBuildTimeConfig devservices; | ||
KafkaDevServicesBuildTimeConfig devservices(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters