forked from quarkusio/quarkus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use @ConfigMapping in SmallRye Reactive Messaging extensions
- Loading branch information
Showing
34 changed files
with
233 additions
and
283 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
10 changes: 5 additions & 5 deletions
10
.../main/java/io/quarkus/smallrye/reactivemessaging/amqp/deployment/AmqpBuildTimeConfig.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,19 +1,19 @@ | ||
package io.quarkus.smallrye.reactivemessaging.amqp.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; | ||
|
||
@ConfigRoot(name = "amqp", phase = ConfigPhase.BUILD_TIME) | ||
public class AmqpBuildTimeConfig { | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.amqp") | ||
public interface AmqpBuildTimeConfig { | ||
|
||
/** | ||
* Dev Services. | ||
* <p> | ||
* Dev Services allows Quarkus to automatically start an AMQP broker in dev and test mode. | ||
*/ | ||
@ConfigItem | ||
@ConfigDocSection(generated = true) | ||
public AmqpDevServicesBuildTimeConfig devservices; | ||
AmqpDevServicesBuildTimeConfig 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
28 changes: 21 additions & 7 deletions
28
...us/smallrye/reactivemessaging/kafka/deployment/ReactiveMessagingKafkaBuildTimeConfig.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,21 +1,35 @@ | ||
package io.quarkus.smallrye.reactivemessaging.kafka.deployment; | ||
|
||
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 = "messaging.kafka", phase = ConfigPhase.BUILD_TIME) | ||
public class ReactiveMessagingKafkaBuildTimeConfig { | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.messaging.kafka") | ||
public interface ReactiveMessagingKafkaBuildTimeConfig { | ||
/** | ||
* Whether or not Kafka serializer/deserializer auto-detection is enabled. | ||
*/ | ||
@ConfigItem(name = "serializer-autodetection.enabled", defaultValue = "true") | ||
public boolean serializerAutodetectionEnabled; | ||
@WithName("serializer-autodetection.enabled") | ||
@WithDefault("true") | ||
boolean serializerAutodetectionEnabled(); | ||
|
||
/** | ||
* Whether Kafka serializer/deserializer generation is enabled. | ||
* When no serializer/deserializer are found and not set, Quarkus generates a Jackson-based serde. | ||
*/ | ||
@ConfigItem(name = "serializer-generation.enabled", defaultValue = "true") | ||
public boolean serializerGenerationEnabled; | ||
@WithName("serializer-generation.enabled") | ||
@WithDefault("true") | ||
boolean serializerGenerationEnabled(); | ||
|
||
/** | ||
* Enables the graceful shutdown in dev and test modes. | ||
* The graceful shutdown waits until the inflight records have been processed and the offset committed to Kafka. | ||
* While this setting is highly recommended in production, in dev and test modes, it's disabled by default. | ||
* This setting allows to re-enable it. | ||
*/ | ||
@WithDefault("false") | ||
boolean enableGracefulShutdownInDevAndTestMode(); | ||
} |
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
18 changes: 0 additions & 18 deletions
18
...c/main/java/io/quarkus/smallrye/reactivemessaging/kafka/ReactiveMessagingKafkaConfig.java
This file was deleted.
Oops, something went wrong.
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
10 changes: 5 additions & 5 deletions
10
.../main/java/io/quarkus/smallrye/reactivemessaging/mqtt/deployment/MqttBuildTimeConfig.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,15 +1,15 @@ | ||
package io.quarkus.smallrye.reactivemessaging.mqtt.deployment; | ||
|
||
import io.quarkus.runtime.annotations.ConfigItem; | ||
import io.quarkus.runtime.annotations.ConfigPhase; | ||
import io.quarkus.runtime.annotations.ConfigRoot; | ||
import io.smallrye.config.ConfigMapping; | ||
|
||
@ConfigRoot(name = "mqtt", phase = ConfigPhase.BUILD_TIME) | ||
public class MqttBuildTimeConfig { | ||
@ConfigRoot(phase = ConfigPhase.BUILD_TIME) | ||
@ConfigMapping(prefix = "quarkus.mqtt") | ||
public interface MqttBuildTimeConfig { | ||
|
||
/** | ||
* Configuration for DevServices. DevServices allows Quarkus to automatically start a MQTT broker in dev and test mode. | ||
*/ | ||
@ConfigItem | ||
public MqttDevServicesBuildTimeConfig devservices; | ||
MqttDevServicesBuildTimeConfig 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
Oops, something went wrong.