camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpeschke <>
Subject MongoDB Consumer Endpoint: ReadPreference cannot be set?
Date Wed, 11 Mar 2015 16:11:45 GMT
When trying to use the "readPreference" parameter in a mongodb consumer
endpoint, an illegal argument exception will be thrown during

/operation, writeConcern, writeConcernRef, readPreference, dynamicity,
invokeGetLastError options cannot appear on a consumer endpoint/

I do not quiet understand this behaviour:
In my case, I use a tailable cursor consumer that should "listen" for
updates on a capped collection. These updates are immutable (they don't get
changed once they have been inserted), so for performance optimization, it
would make perfectly sense to perform those read operations on the secondary
hosts in the replica set.

The only reason I see for forbidding the definition of a different read
preference here is that we need a write operation if persistent tail
tracking is enabled and this should be performed on the primary. But as the
MongoDB Java API would allow you to define a readPrefercne=primary only on
the persistent tail tracking collection, this isn't a conflict, is it?

Best regards,

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message