From dev-return-68301-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Thu Dec 6 16:10:41 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D4992180674 for ; Thu, 6 Dec 2018 16:10:40 +0100 (CET) Received: (qmail 61136 invoked by uid 500); 6 Dec 2018 15:10:39 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 61125 invoked by uid 99); 6 Dec 2018 15:10:39 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Dec 2018 15:10:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 2538BE12B8; Thu, 6 Dec 2018 15:10:39 +0000 (UTC) From: franz1981 To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #2434: ARTEMIS-1867 FQQN for producers Content-Type: text/plain Message-Id: <20181206151039.2538BE12B8@git1-us-west.apache.org> Date: Thu, 6 Dec 2018 15:10:39 +0000 (UTC) Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239488173 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java --- @@ -53,7 +54,13 @@ private final Map routingNamePositions = new ConcurrentHashMap<>(); - private final Map bindingsMap = new ConcurrentHashMap<>(); + private final Map bindingsIdMap = new ConcurrentHashMap<>(); + + /** + * This is the same as bindingsIdMap but indexed on the binding's uniqueName rather than ID. Two maps are + * maintained to speed routing, otherwise we'd have to loop through the bindingsIdMap when routing to an FQQN. + */ + private final Map bindingsNameMap = new ConcurrentHashMap<>(); --- End diff -- I'm not aware of the context here, but considering that are used 2 different concurrent maps I suppose that there is no chance that data would be different between them from a reader pov right? If not I suppose that's fine ---