Hi Team,Our Camel Mongo DB component Doesn't support multiple mongo db instance. By default it uses single Mongodb bean in all the mongo endpoint.
Issue: I have created two different mongo bean instance for two database with respective authentication. And two mongodb beans instance are created in the spring. When initializing/creating mongo endpoints(multiple endpoints with different DB) with DB its taking first mongo endpoint db connection to all the endpoint. So all the mongo endpoints are pointing to same database which was added first when creating first mongo endpoint. I have commented out the if check and allowing to look up mongo connection for each mongo endpoint creation in MongoDbComponent.java . And its working for multiple DB. Why we are allowing single mongoDB in camel , is it because any issue? protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { // TODO: this only supports one mongodb //if (db == null) { db = CamelContextHelper.mandatoryLookup(getCamelContext(), remaining, Mongo.class); LOG.debug("Resolved the connection with the name {} as {}", remaining, db); //} https://github.com/apache/camel/blob/master/components/camel-mongodb/src/main/java/org/apache/camel/component/mongodb/MongoDbComponent.java Thanks, Selva -- View this message in context: http://camel.465427.n5.nabble.com/Camel-mongo-db-does-not-support-multiple-mongo-DB-tp5765468.html Sent from the Camel - Users mailing list archive at Nabble.com.