[
https://issues.apache.org/jira/browse/CAMEL-14258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16992547#comment-16992547
]
Pasquale Congiusti commented on CAMEL-14258:
--------------------------------------------
I started the development needed assuming that the new connection bean was
going to be compatible with the older one: it's not. I have a couple of open
points I'd like to discuss:
1. The [new connection
bean|https://mongodb.github.io/mongo-java-driver/3.7/javadoc/?com/mongodb/client/MongoClient.html]
is using a different interface and it does not expose all the information
exposed by the [old
one|https://mongodb.github.io/mongo-java-driver/3.7/javadoc/?com/mongodb/client/MongoClient.html].
That means that any implementation won't be backward compatible. Would it be
okey if we break this kind of compatibility in a minor release?
2. If we go ahead with the implementation we will have to let the user
configure _WriteConcern_ and _ReadPreference_ properties by declaring them
explicitly instead of expecting this configuration to be done by the connection
bean like it's now. From development perspective this means that we should
introduce a couple of endpoint properties and let the user declare those
parameter explicitly (or fallback to default if missing).
I'd like some opinion before going ahead with the development.
> [camel-mongodb] New MongoClient driver recommendations
> ------------------------------------------------------
>
> Key: CAMEL-14258
> URL: https://issues.apache.org/jira/browse/CAMEL-14258
> Project: Camel
> Issue Type: Improvement
> Reporter: Pasquale Congiusti
> Assignee: Pasquale Congiusti
> Priority: Minor
>
> Starting from version mongo-java-driver 3.7 version, the recommended way to
> create a connection to MongoDB is using the [MongoClients
> factory|https://mongodb.github.io/mongo-java-driver/3.7/javadoc/?com/mongodb/client/MongoClient.html]
> which is finally returning a _com.mongodb.client.MongoClient_.
> We're originally using _com.mongodb.MongoClient_ class instead, so we should
> switch to the new implementation to be aligned with the latest recommendation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)