Hi Joerg, Thanks for your feedback! Indeed this can probably be improved.
Could you please open a ticket in our Jira? How would you feel about submitting a pull request? Thanks! Sent from my iPad > On 11 Mar 2015, at 16:13, jpeschke <pesc...@etone.de> wrote: > > Hello, > When trying to use the "readPreference" parameter in a mongodb consumer > endpoint, an illegal argument exception will be thrown during > initialisation: > > /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, > Joerg > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/MongoDB-Consumer-Endpoint-ReadPreference-cannot-be-set-tp5764015.html > Sent from the Camel - Users mailing list archive at Nabble.com.