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 5A972200CD9 for ; Thu, 3 Aug 2017 13:52:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 58E5C16B68C; Thu, 3 Aug 2017 11:52:53 +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 7827D16B68A for ; Thu, 3 Aug 2017 13:52:52 +0200 (CEST) Received: (qmail 55652 invoked by uid 500); 3 Aug 2017 11:52:51 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 55640 invoked by uid 99); 3 Aug 2017 11:52:51 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 11:52:51 +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 60CFE1807F3 for ; Thu, 3 Aug 2017 11:52:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.413 X-Spam-Level: X-Spam-Status: No, score=0.413 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, URI_HEX=1.313, URI_TRY_3LD=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-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id G0jpetOBetpA for ; Thu, 3 Aug 2017 11:52:48 +0000 (UTC) Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2E6375FD47 for ; Thu, 3 Aug 2017 11:52:48 +0000 (UTC) Received: by mail-wr0-f170.google.com with SMTP id 12so4754696wrb.1 for ; Thu, 03 Aug 2017 04:52:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=+o2QN/S461CmWyBP5wzlpoYgZk9UdP3A8i5UR4SVGe4=; b=KMDgt4y36fXqIAPXAR7VQDaEWtksk0pNPPTBCjlVELSIYgA/c7P6KAkRSYEqPyKvVO Rzjo66EKipwQlIPzHiRzBL4lUngf8z46NHCM4mXb23ymbLlhqV6N8VuybtalC9d5toyW xFfALc3sbjNTihvqMrFHyl7LVk+//lZjQi+2TkBmHU6+91/JTX3C6rbvQUuGvZDIGQI/ 6WQ1rI55W1db+pBwfIzo8wcC5AU/XgWFPvgEF4OeO3LcKipWBFE93s/Bu7wuy5ocIiEH ANOxiEJHsbyVsJsF/LTHCynjtE0UM0bmE4Ec4g1VDRGwRf2n4ITdWF0X/546lBJHSXNJ kuFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=+o2QN/S461CmWyBP5wzlpoYgZk9UdP3A8i5UR4SVGe4=; b=mXytTqw7Xt7VTwCRVzvtcDRxmKRqGrfJ5y+cMPh3kGqegWoMkohhORf0hN4+brhY+7 6yCqaS1uUm1Toexha/0Qh3SG23EHGwBbnY2289MWmrlyJouWkeEjVnnWmoeyGCjGsGhN XAwTZ/RRlhY+gV6TMUXfs21WK39zdo0rRUA9CvWEcvuBNQnf08R5QyCKYfMK2qwKk40b q6l1+G9vpyiFhAhlCsy7+myRSFzhA0gMtnnpjyca1JEA4XSuhmCJqiwQCey3bFydYfH3 vNzp6BRRJAR+OtLlEfYMIZKN/KBUDnYzSZdmZLPMSCgBa+ePAF/a3Clof0QCof2C7N+I 890Q== X-Gm-Message-State: AIVw112nJWGPjOb0zr+N6WNozEsC70BzE6ZMm2l+ni/YP5w4SSzfXH1b NzTVr//mIA1jGvbQo3z6JW8sB0yCCIHu X-Received: by 10.223.135.157 with SMTP id b29mr1255970wrb.170.1501761167032; Thu, 03 Aug 2017 04:52:47 -0700 (PDT) MIME-Version: 1.0 References: <1501684086948-4729166.post@n4.nabble.com> <1E5E2643-263C-431D-944B-FDA6519F6C00@me.com> In-Reply-To: <1E5E2643-263C-431D-944B-FDA6519F6C00@me.com> From: Clebert Suconic Date: Thu, 03 Aug 2017 11:52:36 +0000 Message-ID: Subject: Re: ActiveMQConnectionFactory: use initial connectors instead of received topology To: users@activemq.apache.org Content-Type: multipart/alternative; boundary="001a114916c8e6068e0555d804a4" archived-at: Thu, 03 Aug 2017 11:52:53 -0000 --001a114916c8e6068e0555d804a4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It is not a bug. People use this to feed an initial list than the topology could be much bigger. On Thu, Aug 3, 2017 at 1:18 AM Michael Andr=C3=A9 Pearce < michael.andre.pearce@me.com> wrote: > To me this sounds like a bug, where you get two connections because you > use two lists. > > as in why doesn't it use the topology list straight away? Fair enough for > discovery of that topology is should temporarily make a connection using > the static connections, but it should disconnect and reconnect using the > topology. I.e. It should just discover the topology using the static > discovery list. > > Similar to udp discovery it simply discovers then it uses the topology > returned. > > Sent from my iPad > > > On 3 Aug 2017, at 04:59, Clebert Suconic > wrote: > > > > I agree we could add an option. We could use the URI parameters Thought > as > > a beanUtils? > > > > > >> On Wed, Aug 2, 2017 at 11:36 PM Justin Bertram > wrote: > >> > >> I agree there should be an option to stick with the "initial" connecto= rs > >> rather than being forced to use the topology. This would be an option > on > >> the Netty connector. I think "useTopology" (defaults to true) would b= e > a > >> good name. > >> > >> > >> Justin > >> > >> On Wed, Aug 2, 2017 at 9:28 AM, cjaniake > >> wrote: > >> > >>> Hi there, I have been using the ActiveMQ Artemis JMS interface withou= t > >>> JNDI. > >>> We are not using server discovery, we use static connectors instead. > >>> In the connection factory configuration we supply a list of hosts, th= at > >> are > >>> located on two different datacenters, acting as two different cluster= s. > >>> Using the RoundRobinConnectionLoadBalancingPolicy we expected to > connect > >>> to > >>> every server on the list, but that was not what happened. > >>> Debugging the code we realized that, after connecting to the first > >> (random) > >>> host on the list, the Server Locator do not use the initial connector= s > >> list > >>> anymore, it uses the received topology for the next connections. > >>> We understand this might be useful in simpler scenarios, but this is > not > >>> working for us. > >>> On a sandbox environment we have even tried to remove the cluster > >>> connection > >>> configuration, for the servers to act on a stadalone manner, but even > >>> though > >>> the server locator acts the same way, receiving a "topology" of only > one > >>> node and restrict the next connections this one host. > >>> > >>> There is a number of problems and inneficiencies we see on this > approach. > >>> If we have a cluster with 3 hosts for example, and we declare those o= n > >> the > >>> host list and get 3 connections using the round robin policy, we woul= d > >>> expect to get one connection for each host. But that's not what > happens. > >>> The > >>> load balancing policy starts iterating over one list (the initial > >> connector > >>> list) and after the first successfull connection it continues iterati= ng > >>> over > >>> another list (the received topology), so most of the time you would g= et > >> two > >>> connections to the same host and none for one of them. > >>> > >>> In a scenario like we have here, with two clusters in different > >> locations, > >>> it is even worse. > >>> We would like to know if we there is an option other than creating a > >>> connection factory for each host we want to use, and if we can propos= e > an > >>> improvement. > >>> We are willing to contribute with the development, if we have an > >>> understanding on a possible solution for that problem. > >>> > >>> Thank you very much. > >>> > >>> > >>> > >>> > >>> -- > >>> View this message in context: http://activemq.2283324.n4.nabble.com/ > >>> ActiveMQConnectionFactory-use-initial-connectors-instead-of- > >>> received-topology-tp4729166.html > >>> Sent from the ActiveMQ - User mailing list archive at Nabble.com. > >>> > >> > > -- > > Clebert Suconic > --=20 Clebert Suconic --001a114916c8e6068e0555d804a4--