Class MongodbConfig

    • Field Detail

      • 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

         
         &#64;MongoClientName("cluster1")
         &#64;Inject
         ReactiveMongoClient mongoClientCluster1
         
         
    • Constructor Detail

      • MongodbConfig

        public MongodbConfig()