Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D19E3200D15 for ; Thu, 5 Oct 2017 17:20:12 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D00B8160BDA; Thu, 5 Oct 2017 15:20:12 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 20DC71609DA for ; Thu, 5 Oct 2017 17:20:11 +0200 (CEST) Received: (qmail 64364 invoked by uid 500); 5 Oct 2017 15:09:46 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 63737 invoked by uid 99); 5 Oct 2017 15:09:19 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Oct 2017 15:09:19 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 37B03197403 for ; Thu, 5 Oct 2017 15:08:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.379 X-Spam-Level: X-Spam-Status: No, score=0.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BMeQiTiVlnh3 for ; Thu, 5 Oct 2017 15:08:50 +0000 (UTC) Received: from mail-lf0-f44.google.com (mail-lf0-f44.google.com [209.85.215.44]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7708C5F19B for ; Thu, 5 Oct 2017 15:08:50 +0000 (UTC) Received: by mail-lf0-f44.google.com with SMTP id b127so17303127lfe.9 for ; Thu, 05 Oct 2017 08:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=jfyPQgZzarxREVbsqOETtVlb5uJfe7hjozNV6eMrNO8=; b=ED0ROKWDVcdwBrr0ocUaGCKRTPvm8bH1nCO7ZSVqvR42a1irbT7JEJbzmsYKrazGpJ vsh9VAE7Iiy92IB5HrHw4BBXiojuyzoR9C3BKhB8a8UrK8CXkbTXf8jUk08PGf7hWy2g mam/UflmPiT+ni5/sFs1JozR2cRaDt0QJdxujzteBfytREyw4FcU4E3U+WEYrUVk79mW sqz0BEl8VUF8zXdZoa42w73y1ToQY58uYQRte+E/vYK/y7bP9wiqNg7KkZdIUUMj3OeJ hCZFoFaIuLmI1VkeevwkR86mjE0ld116HmBqf5khhX5TbjW7Xbdfc3h2QlXEpn46oQz5 vzJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=jfyPQgZzarxREVbsqOETtVlb5uJfe7hjozNV6eMrNO8=; b=l7NlwbRwX1ylVbBmsgsFPbMdbuO0+GHlbzLnQgni8HPQIKjgldxpYjiLocD7Hou433 ndLBY6uFloCM2mg/q5X/fchIQi3EcUHKl/ZvEDDkNHhpi9VMb1sw8ENcXxPVqJh7MIAS y15Wm/f5l0nWnV53dUpeM2MlzeZRZkvikqm6m65zSaBHfhkC4Nndy9YNsoAAB4Oh7j8z yxXuwIVFYnqB0gCUL8JBE2BB15e7pos+vswpcNXBYzOa8bDgK6ZrYCCBOp4vHxMNhZMC /QPXC4+1sqyaneKUlvYHHWXP0nV1eZ7SpsJtWbvdRk9larByONbzHk9P/DYtkaGD6WZH lkDQ== X-Gm-Message-State: AMCzsaVdgEC8i3hA1EochMy8fN6PQn30ZRMz1EdeyrWNjXYZZgCRvDkE yF4Xi7yPylGPOxn+OCctgFF/GzL3Vx6TGwoSIKxbrA== X-Google-Smtp-Source: AOwi7QDXc0QXAGuIMOnxja9qdkOkCNG5uouVHphwM/JW9b5IYRfLiJ7cWJonUCZIQh8vgILRy6vpdk3797BJ7oehjHY= X-Received: by 10.46.7.66 with SMTP id i2mr2361026ljd.135.1507216129513; Thu, 05 Oct 2017 08:08:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.25.22.218 with HTTP; Thu, 5 Oct 2017 08:08:48 -0700 (PDT) In-Reply-To: References: From: Clebert Suconic Date: Thu, 5 Oct 2017 11:08:48 -0400 Message-ID: Subject: Re: [DISCUSS] URIs on Producer and Consumer To: dev@kafka.apache.org Content-Type: text/plain; charset="UTF-8" archived-at: Thu, 05 Oct 2017 15:20:13 -0000 I can start a KIP discussion on this.. or not if you really think this is against basic rules... I will need authorization to create the page.. if you could assign me regardless so I can have it for next time? On Thu, Oct 5, 2017 at 10:31 AM, Clebert Suconic wrote: > Just as a facility for users... I think it would be easier to > prototype consumers and producer by simply doing new > Consumer("tcp://HOST:PORT") or new Producer("tcp://HOST:PORT")... > > on the other project I work (ActiveMQ Artemis) we used to do a similar > way to what Kafka does..we then provided the URI support and I now > think the URI was a lot easier. > > I'm just trying to leverage my experience into here... I'm an apache > committer at ActiveMQ Artemis.. I think I could bring some goodies > into Kafka.. I see no reason to be a competitor.. instead I'm all up > to contribute here as well. And I was looking for something small and > easy to start with. > > > > > > > On Thu, Oct 5, 2017 at 10:15 AM, Jay Kreps wrote: >> Hey Clebert, >> >> Is there a motivation for adding a second way? We generally try to avoid >> having two ways to do something unless it's really needed...I suspect you >> have a reason for wanting this, though. >> >> -Jay >> >> On Mon, Oct 2, 2017 at 6:15 AM Clebert Suconic >> wrote: >> >>> At ActiveMQ and ActiveMQ Artemis, ConnectionFactories have an >>> interesting feature where you can pass parameters through an URI. >>> >>> I was looking at Producer and Consumer APIs, and these two classes are >>> using a method that I considered old for Artemis resembling HornetQ: >>> >>> Instead of passing a Properties (aka HashMaps), users would be able to >>> create a Consumer or Producer by simply doing: >>> >>> new Consumer("tcp::/host:port?properties=values;properties=values...etc"); >>> >>> Example: >>> >>> >>> Instead of the following: >>> >>> Map config = new HashMap<>(); >>> config.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999"); >>> config.put(ConsumerConfig.RECEIVE_BUFFER_CONFIG, -2); >>> new KafkaConsumer<>(config, new ByteArrayDeserializer(), new >>> ByteArrayDeserializer()); >>> >>> >>> >>> Someone could do >>> >>> new KafkaConsumer<>("tcp://localhost:9999?receive.buffer.bytes=-2", >>> new ByteArrayDeserializer(), new ByteArrayDeserializer()); >>> >>> >>> >>> I don't know if that little API improvement would be welcomed? I would be >>> able to send a Pull Request but I don't want to do it if that wouldn't >>> be welcomed in the first place: >>> >>> >>> Just an idea... let me know if that is welcomed or not. >>> >>> If so I can forward the discussion into how I would implement it. >>> > > > > -- > Clebert Suconic -- Clebert Suconic