Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CDEAF17995 for ; Wed, 11 Mar 2015 16:13:35 +0000 (UTC) Received: (qmail 70886 invoked by uid 500); 11 Mar 2015 16:13:35 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 70837 invoked by uid 500); 11 Mar 2015 16:13:35 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 70815 invoked by uid 99); 11 Mar 2015 16:13:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 16:13:35 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=URI_HEX X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [162.253.133.43] (HELO mwork.nabble.com) (162.253.133.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Mar 2015 16:13:29 +0000 Received: from msam.nabble.com (unknown [162.253.133.85]) by mwork.nabble.com (Postfix) with ESMTP id C13DE16EDB8C for ; Wed, 11 Mar 2015 09:11:52 -0700 (PDT) Date: Wed, 11 Mar 2015 09:11:45 -0700 (MST) From: jpeschke To: users@camel.apache.org Message-ID: <1426090305907-5764015.post@n5.nabble.com> Subject: MongoDB Consumer Endpoint: ReadPreference cannot be set? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.