Return-Path: X-Original-To: apmail-kafka-users-archive@www.apache.org Delivered-To: apmail-kafka-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 23C6F10886 for ; Fri, 11 Oct 2013 18:31:04 +0000 (UTC) Received: (qmail 86413 invoked by uid 500); 11 Oct 2013 18:31:03 -0000 Delivered-To: apmail-kafka-users-archive@kafka.apache.org Received: (qmail 86203 invoked by uid 500); 11 Oct 2013 18:31:03 -0000 Mailing-List: contact users-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@kafka.apache.org Delivered-To: mailing list users@kafka.apache.org Received: (qmail 86195 invoked by uid 99); 11 Oct 2013 18:31:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Oct 2013 18:31:02 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of hsy541@gmail.com designates 209.85.219.45 as permitted sender) Received: from [209.85.219.45] (HELO mail-oa0-f45.google.com) (209.85.219.45) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Oct 2013 18:30:57 +0000 Received: by mail-oa0-f45.google.com with SMTP id o17so2720127oag.18 for ; Fri, 11 Oct 2013 11:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Am2rGpFHxImUn9qvBueCeL2E6HuV307mXOY74RyEwLE=; b=J4RE812tTfJbgM9l2jtKzKJJgBPXqZEPbxgtDqEdPekBxkyF1vbNhKND/Cy3npfaL0 sSP/Dw1HREfC+8XSwNLqgRRl5K48LYRo2PahooHcg0e3dfXcGINdNck3rzw6+X7L1yEE nlkA3d8YhrQNULurOJrse8TNsiciTrblbjf5w1KX3d67QZND7PpAJEbFdTFT70/tFi7J YIrk++h2Y4NEc8Z4Ebh3OPFEeQqkcpMhh3U8XHCxk+5+R5D09zGqe1KsVlWtnFbO2Yi1 VJ46xx6CBsY3LLBZUpPzYgacFJrBt82WQvxy0OiceUwXR2xJJBHZHydHQhcPRAsBiOjY i1uA== MIME-Version: 1.0 X-Received: by 10.182.144.136 with SMTP id sm8mr1554902obb.63.1381516236893; Fri, 11 Oct 2013 11:30:36 -0700 (PDT) Received: by 10.76.113.208 with HTTP; Fri, 11 Oct 2013 11:30:36 -0700 (PDT) In-Reply-To: References: Date: Fri, 11 Oct 2013 11:30:36 -0700 Message-ID: Subject: Re: Is there a way to pull out kafka metadata from zookeeper? From: "hsy541@gmail.com" To: users@kafka.apache.org Content-Type: multipart/alternative; boundary=089e0149cd5e8d365604e87b50f0 X-Virus-Checked: Checked by ClamAV on apache.org --089e0149cd5e8d365604e87b50f0 Content-Type: text/plain; charset=ISO-8859-1 Thanks guys! But I feel weird. Assume I have 20 brokers for 10 different topics with 2 partitions and 2 replicas for each. For each consumer consumes different topic/replica I have to specify those 20 brokers and go over all of them to know which broker is alive. And even worse how about I dynamically add new broker into the cluster and remove the old one. I think it's nice to have a way to get metadata from zookeeper(centralized coordinator?) directly. Best, Siyuan On Fri, Oct 11, 2013 at 9:12 AM, Neha Narkhede wrote: > If, for some reason, you don't have access to a virtual IP or load > balancer, you need to round robin once through all the brokers before > failing a TopicMetadataRequest. So unless all the brokers in your cluster > are down, this should not be a problem. > > Thanks, > Neha > > > On Thu, Oct 10, 2013 at 10:50 PM, hsy541@gmail.com > wrote: > > > Hi guys, > > > > I'm trying to maintain a bunch of simple kafka consumer to consume > messages > > from brokers. I know there is a way to send TopicMetadataRequest to > broker > > and get the response from the broker. But you have to specify the broker > > list to query the information. But broker might not be available because > of > > some failure. My question is is there any api I can call and query broker > > metadata for topic/partition directly from zookeeper? I know I can query > > that information using zookeeper API. But that's not friendly > datastructure > > like the TopicMetadata/PartitionMetadata. Thank you! > > > > Best, > > Siyuan > > > --089e0149cd5e8d365604e87b50f0--