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 18D26200CA6 for ; Tue, 13 Jun 2017 19:33:17 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1725E160BE9; Tue, 13 Jun 2017 17:33: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 6770D160BC5 for ; Tue, 13 Jun 2017 19:33:16 +0200 (CEST) Received: (qmail 29749 invoked by uid 500); 13 Jun 2017 17:33:15 -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 29728 invoked by uid 99); 13 Jun 2017 17:33:15 -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; Tue, 13 Jun 2017 17:33:15 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 13E0BDFE5C; Tue, 13 Jun 2017 17:33:15 +0000 (UTC) From: gemmellr To: dev@activemq.apache.org Reply-To: dev@activemq.apache.org References: In-Reply-To: Subject: [GitHub] activemq-artemis pull request #1337: ARTEMIS-1205: AMQP Shared Durable Subsc... Content-Type: text/plain Message-Id: <20170613173315.13E0BDFE5C@git1-us-west.apache.org> Date: Tue, 13 Jun 2017 17:33:15 +0000 (UTC) archived-at: Tue, 13 Jun 2017 17:33:17 -0000 Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121737014 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { - queue = queue.split("\\|")[0]; - } - if (isVolatile) { - queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + if (shared) { + if (queue.contains("|")) { + queue = queue.split("\\|")[0]; + } + if (isVolatile) { + queue += ":shared-volatile"; + } + if (global) { + queue += ":global"; + } } + return queue; + } else { + final boolean durable = !isVolatile; + final String subscriptionName = pubId.contains("|") ? pubId.split("\\|")[0] : pubId; + final String clientID = clientId == null || clientId.isEmpty() || global || pubId.endsWith("|global") ? null : clientId; --- End diff -- As mentioned on the JIRA/other PR, the broker should not be inspecting the link name (here passed as 'pubId' it seems) to see if it ends in "|global" specifically and then acting differently, but instead ensure that the 'global' flag passed is correct. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---