Package io.quarkus.mongodb.runtime
Class MongodbConfig
- java.lang.Object
-
- io.quarkus.mongodb.runtime.MongodbConfig
-
@ConfigRoot(name="mongodb", phase=RUN_TIME) public class MongodbConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIG_NAME
MongoClientConfig
defaultMongoClientConfig
The default mongo client connection.static String
DNS_LOG_ACTIVITY
static String
DNS_LOOKUP_TIMEOUT
static String
DNS_SERVER_HOST
static String
DNS_SERVER_PORT
Optional<Boolean>
dnsLookupLogActivity
This property enables the logging ot the DNS lookup.Optional<Boolean>
dnsLookupLogActivityInNativeMode
Deprecated.this property has been deprecated in favor ofdnsLookupLogActivity
Duration
dnsLookupTimeout
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property configures the DNS lookup timeout duration.Duration
dnsLookupTimeoutInNativeMode
Deprecated.this property has been deprecated in favor ofdnsLookupTimeout
Optional<String>
dnsServer
This property configures the DNS server.Optional<String>
dnsServerInNativeMode
Deprecated.this property has been deprecated in favor ofdnsServer
OptionalInt
dnsServerPort
This property configures the DNS server port.OptionalInt
dnsServerPortInNativeMode
Deprecated.this property has been deprecated in favor ofdnsServerPort
Map<String,MongoClientConfig>
mongoClientConfigs
Configures additional mongo client connections.static String
NATIVE_DNS_LOG_ACTIVITY
Deprecated.static String
NATIVE_DNS_LOOKUP_TIMEOUT
Deprecated.static String
NATIVE_DNS_SERVER_HOST
Deprecated.static String
NATIVE_DNS_SERVER_PORT
Deprecated.boolean
useVertxDnsResolverInNativeMode
Deprecated.This resolver is always used
-
Constructor Summary
Constructors Constructor Description MongodbConfig()
-
-
-
Field Detail
-
CONFIG_NAME
public static final String CONFIG_NAME
- See Also:
- Constant Field Values
-
NATIVE_DNS_LOG_ACTIVITY
@Deprecated public static final String NATIVE_DNS_LOG_ACTIVITY
Deprecated.- See Also:
- Constant Field Values
-
DNS_LOG_ACTIVITY
public static final String DNS_LOG_ACTIVITY
- See Also:
- Constant Field Values
-
NATIVE_DNS_SERVER_HOST
@Deprecated public static final String NATIVE_DNS_SERVER_HOST
Deprecated.- See Also:
- Constant Field Values
-
DNS_SERVER_HOST
public static final String DNS_SERVER_HOST
- See Also:
- Constant Field Values
-
NATIVE_DNS_SERVER_PORT
@Deprecated public static final String NATIVE_DNS_SERVER_PORT
Deprecated.- See Also:
- Constant Field Values
-
DNS_SERVER_PORT
public static final String DNS_SERVER_PORT
- See Also:
- Constant Field Values
-
NATIVE_DNS_LOOKUP_TIMEOUT
@Deprecated public static final String NATIVE_DNS_LOOKUP_TIMEOUT
Deprecated.- See Also:
- Constant Field Values
-
DNS_LOOKUP_TIMEOUT
public static final String DNS_LOOKUP_TIMEOUT
- See Also:
- Constant Field Values
-
defaultMongoClientConfig
@ConfigItem(name="<<parent>>") public MongoClientConfig defaultMongoClientConfig
The default mongo client connection.
-
mongoClientConfigs
@ConfigItem(name="<<parent>>") public Map<String,MongoClientConfig> mongoClientConfigs
Configures additional mongo client connections.each cluster have a unique identifier witch must be identified to select the right connection. example:
quarkus.mongodb.cluster1.connection-string = mongodb://mongo1:27017 quarkus.mongodb.cluster2.connection-string = mongodb://mongo2:27017,mongodb://mongo3:27017
And then use annotations above the instances of MongoClient to indicate which instance we are going to use
@MongoClientName("cluster1") @Inject ReactiveMongoClient mongoClientCluster1
-
useVertxDnsResolverInNativeMode
@Deprecated @ConfigItem(name="native.dns.use-vertx-dns-resolver", defaultValue="false") public boolean useVertxDnsResolverInNativeMode
Deprecated.This resolver is always usedThe default DNS resolver used to handlemongo+srv://
urls cannot be used in a native executable. This option enables a fallback to use Vert.x to resolve the server names instead of JNDI. IMPORTANT: The resolution may be different in JVM mode using the default (JNDI-based) DNS resolver, and in native mode. This feature is experimental.
-
dnsServerInNativeMode
@Deprecated @ConfigItem(name="native.dns.server-host") public Optional<String> dnsServerInNativeMode
Deprecated.this property has been deprecated in favor ofdnsServer
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property configures the DNS server. If the server is not set, it tries to read the firstnameserver
from/etc/resolv.conf
(if the file exists), otherwise fallback to the default.
-
dnsServer
@ConfigItem(name="dns.server-host") public Optional<String> dnsServer
This property configures the DNS server. If the server is not set, it tries to read the firstnameserver
from/etc /resolv.conf
(if the file exists), otherwise fallback to the default.
-
dnsServerPortInNativeMode
@Deprecated @ConfigItem(name="native.dns.server-port", defaultValue="53") public OptionalInt dnsServerPortInNativeMode
Deprecated.this property has been deprecated in favor ofdnsServerPort
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property configures the DNS server port.
-
dnsServerPort
@ConfigItem(name="dns.server-port", defaultValue="53") public OptionalInt dnsServerPort
This property configures the DNS server port.
-
dnsLookupTimeoutInNativeMode
@Deprecated @ConfigItem(name="native.dns.lookup-timeout", defaultValue="5s") public Duration dnsLookupTimeoutInNativeMode
Deprecated.this property has been deprecated in favor ofdnsLookupTimeout
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property configures the DNS lookup timeout duration.
-
dnsLookupTimeout
@ConfigItem(name="dns.lookup-timeout", defaultValue="5s") public Duration dnsLookupTimeout
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property configures the DNS lookup timeout duration.
-
dnsLookupLogActivityInNativeMode
@Deprecated @ConfigItem(name="native.dns.log-activity", defaultValue="false") public Optional<Boolean> dnsLookupLogActivityInNativeMode
Deprecated.this property has been deprecated in favor ofdnsLookupLogActivity
Ifnative.dns.use-vertx-dns-resolver
is set totrue
, this property enables the logging ot the DNS lookup. It can be useful to understand why the lookup fails.
-
dnsLookupLogActivity
@ConfigItem(name="dns.log-activity", defaultValue="false") public Optional<Boolean> dnsLookupLogActivity
This property enables the logging ot the DNS lookup. It can be useful to understand why the lookup fails.
-
-