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 4E997200CD9 for ; Thu, 3 Aug 2017 18:44:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4D1A616BFEA; Thu, 3 Aug 2017 16:44:17 +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 6C0DE16BFE9 for ; Thu, 3 Aug 2017 18:44:16 +0200 (CEST) Received: (qmail 38665 invoked by uid 500); 3 Aug 2017 16:44:15 -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 38644 invoked by uid 99); 3 Aug 2017 16:44:15 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Aug 2017 16:44:15 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id BC50C1A08D3 for ; Thu, 3 Aug 2017 16:44:14 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.422 X-Spam-Level: X-Spam-Status: No, score=-2.422 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=me.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id JjRdbrl2Zkky for ; Thu, 3 Aug 2017 16:44:12 +0000 (UTC) Received: from pv33p33im-asmtp002.me.com (pv33p33im-asmtp002.me.com [17.142.241.11]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id D75C75F5B6 for ; Thu, 3 Aug 2017 16:44:11 +0000 (UTC) Received: from process-dkim-sign-daemon.pv33p33im-asmtp002.me.com by pv33p33im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) id <0OU400C00BJ4PT00@pv33p33im-asmtp002.me.com> for users@activemq.apache.org; Thu, 03 Aug 2017 16:44:10 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=me.com; s=04042017; t=1501778650; bh=1atQrbRquvHhJe++HWkskPIxhf+MFGIZ0PKZ0t+AVp0=; h=From:Content-type:MIME-version:Date:Subject:Message-id:To; b=c2NsQUA1INJzCgT0WUf1bdjkYuaxA3nX3bkeJnCD0BJ++7MG4tBGfpbbaTBw6vImJ 37wOlKgugBiMpT/LqsdvkrnMkRupxTJBEq3/EJS4AbYGRvnsjCGIcLL1SmCtNskGoX mCemSq69qQM3x6qsqrNjBcXjckg5o44nMmlWUUcsSwLzKFv5ix0U2ja/J3KmB4oThi vr+0FJ5G4o5y7Zbn+gpt1cEJDnd5SBvIehS1veR9mNQ+E6eMFCQT+e7o6VyHiA5Mkw BnfaIsEuyxAPxwFoi68EjqzEwAg2NU3hHILWTnJEMayZMP5Kthq/LMcSI7YymLN+Ne uf2IBQEkk2nEg== Received: from icloud.com ([127.0.0.1]) by pv33p33im-asmtp002.me.com (Oracle Communications Messaging Server 8.0.1.2.20170607 64bit (built Jun 7 2017)) with ESMTPSA id <0OU400MVMBTIE450@pv33p33im-asmtp002.me.com> for users@activemq.apache.org; Thu, 03 Aug 2017 16:44:09 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-08-03_08:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1701120000 definitions=main-1708030257 From: =?utf-8?Q?Michael_Andr=C3=A9_Pearce?= Content-type: text/plain; charset=utf-8 Content-transfer-encoding: quoted-printable MIME-version: 1.0 (1.0) Date: Thu, 03 Aug 2017 17:44:05 +0100 Subject: Re: ActiveMQConnectionFactory: use initial connectors instead of received topology Message-id: References: <1501684086948-4729166.post@n4.nabble.com> <1E5E2643-263C-431D-944B-FDA6519F6C00@me.com> <94EB55D7-AFBC-4B94-B80E-CD1E1AA68A96@me.com> In-reply-to: To: users@activemq.apache.org X-Mailer: iPhone Mail (14G60) archived-at: Thu, 03 Aug 2017 16:44:17 -0000 That would work.=20 Sent from my iPhone > On 3 Aug 2017, at 17:41, Justin Bertram wrote: >=20 > IMO the way to deal with this is to just add a bit of logic so you don't > get 2 consecutive connections to the same host. Making a connection with > the static connectors, getting the topology, closing the connection, and > then making another connection with the topology is wasteful. >=20 > In any case, an option not to use the topology at all would be useful. > That is, after all, what this thread is really about. >=20 >=20 > Justin >=20 > On Thu, Aug 3, 2017 at 11:32 AM, Michael Andr=C3=A9 Pearce < > michael.andre.pearce@me.com> wrote: >=20 >> We saw this too when running cluster mode and static discovery before we >> moved to UDP and then finally went to single master cluster due to cost i= n >> some support licensing as had to reduce cpu counts. >>=20 >> Sent from my iPhone >>=20 >>> On 3 Aug 2017, at 17:31, Michael Andr=C3=A9 Pearce < >> michael.andre.pearce@me.com> wrote: >>>=20 >>> The bit I'm getting at is it uses the discovery connection when on >> static instead of discovering getting the topology and then using that to= >> make the connection. >>>=20 >>> This is why when using topology and static you see first two connections= >> to same host as it uses the discovery connection first which for sake of >> discussing host a is first in list, and then the next uses the topology o= ne >> where host a is first in list as such this is why it makes to connections= >> to host a before it makes one to host b. >>>=20 >>>=20 >>>=20 >>> Sent from my iPhone >>>=20 >>>> On 3 Aug 2017, at 14:59, Clebert Suconic >> wrote: >>>>=20 >>>> On Thu, Aug 3, 2017 at 9:01 AM, Michael Andr=C3=A9 Pearce >>>> wrote: >>>>> But what I'm saying is should it be that the discovery should happen >> but then the real connection is made from the returned topology. Like for= >> UDP instead of hoodwinking on the discovery connection. >>>>=20 >>>> I'm not understanding your point here? the connection factory will >>>> always receive a list of the topology (No matter if UDP or TCP) and >>>> load balance based on the topology returned. >>>> There are users using this as a feature. >>>>=20 >>>>=20 >>>>=20 >>>> What I think is needed here is a simple property to the connection >>>> factory, like.... useTopololgy, connectOntTopology (or please help me >>>> find a better name). >>>>=20 >>>>=20 >>>> then you could connect with: >>>>=20 >>>>=20 >>>> ActiveMQConnectionFactory factory =3D new >>>> ActiveMQConnectionFactory((tcp://NODE1:61616,tcp://NODE2: >> 61616)?blockOnDurableSend=3Dfalse&useTopology=3Dfalse"); >>>>=20 >>>>=20 >>>> I"m not sure if useTopology would make it clear.. I'm still thinking >>>> about a better name. >>>>=20 >>>>>=20 >>>>> Sent from my iPhone >>>>>=20 >>>>>> On 3 Aug 2017, at 12:52, Clebert Suconic >> wrote: >>>>>>=20 >>>>>> It is not a bug. People use this to feed an initial list than the >> topology >>>>>> could be much bigger. >>>>>>=20 >>>>>> On Thu, Aug 3, 2017 at 1:18 AM Michael Andr=C3=A9 Pearce < >>>>>> michael.andre.pearce@me.com> wrote: >>>>>>=20 >>>>>>> To me this sounds like a bug, where you get two connections because >> you >>>>>>> use two lists. >>>>>>>=20 >>>>>>> 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. >>>>>>>=20 >>>>>>> Similar to udp discovery it simply discovers then it uses the >> topology >>>>>>> returned. >>>>>>>=20 >>>>>>> Sent from my iPad >>>>>>>=20 >>>>>>>> On 3 Aug 2017, at 04:59, Clebert Suconic >>=20 >>>>>>> wrote: >>>>>>>>=20 >>>>>>>> I agree we could add an option. We could use the URI parameters >> Thought >>>>>>> as >>>>>>>> a beanUtils? >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>> On Wed, Aug 2, 2017 at 11:36 PM Justin Bertram < >> jbertram@redhat.com> >>>>>>> wrote: >>>>>>>>>=20 >>>>>>>>> I agree there should be an option to stick with the "initial" >> connectors >>>>>>>>> rather than being forced to use the topology. This would be an >> option >>>>>>> on >>>>>>>>> the Netty connector. I think "useTopology" (defaults to true) >> would be >>>>>>> a >>>>>>>>> good name. >>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>>> Justin >>>>>>>>>=20 >>>>>>>>> On Wed, Aug 2, 2017 at 9:28 AM, cjaniake < >> christian.janiake@movile.com> >>>>>>>>> wrote: >>>>>>>>>=20 >>>>>>>>>> Hi there, I have been using the ActiveMQ Artemis JMS interface >> without >>>>>>>>>> JNDI. >>>>>>>>>> We are not using server discovery, we use static connectors >> instead. >>>>>>>>>> In the connection factory configuration we supply a list of >> hosts, that >>>>>>>>> are >>>>>>>>>> located on two different datacenters, acting as two different >> clusters. >>>>>>>>>> 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 firs= t >>>>>>>>> (random) >>>>>>>>>> host on the list, the Server Locator do not use the initial >> connectors >>>>>>>>> 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. >>>>>>>>>>=20 >>>>>>>>>> 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 on >>>>>>>>> the >>>>>>>>>> host list and get 3 connections using the round robin policy, we >> would >>>>>>>>>> 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 >> iterating >>>>>>>>>> over >>>>>>>>>> another list (the received topology), so most of the time you >> would get >>>>>>>>> two >>>>>>>>>> connections to the same host and none for one of them. >>>>>>>>>>=20 >>>>>>>>>> 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 >> propose >>>>>>> an >>>>>>>>>> improvement. >>>>>>>>>> We are willing to contribute with the development, if we have an >>>>>>>>>> understanding on a possible solution for that problem. >>>>>>>>>>=20 >>>>>>>>>> Thank you very much. >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>>=20 >>>>>>>>>> -- >>>>>>>>>> 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.= >>>>>>>>>>=20 >>>>>>>>>=20 >>>>>>>> -- >>>>>>>> Clebert Suconic >>>>>>>=20 >>>>>> -- >>>>>> Clebert Suconic >>>>=20 >>>>=20 >>>>=20 >>>> -- >>>> Clebert Suconic >>=20