[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17052704#comment-17052704 ] ASF subversion and git services commented on ARTEMIS-1867: -- Commit 7ad53e57487f58e895aa7188fc1a89096ec3714f in activemq-artemis's branch refs/heads/master from Justin Bertram [ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=7ad53e5 ] ARTEMIS-2645 refactor CLI FQQN support FQQN support for the CLI was implemented via ARTEMIS-1840 before general FQQN support was added for producers via ARTEMIS-1867. The CLI's FQQN functionality is slightly different from what is now generally available and it can be confusing for users. By refactoring the CLI to use the general FQQN support the code can be much simpler and consistent with the expected behavior. Refactoring includes: - Deprecating the use of "fqqn://". The CLI commands use JMS so using "fqqn://" (instead of "queue://" or "topic://") makes the destination type ambiguous which can yield unexpected message routing behavior. Now "queue://" and "topic://" can be used with the normal FQQN syntax (e.g. address::queue). - Eliminating the use of the _AMQ_ROUTE_TO header when sending messags to an FQQN. The _AMQ_ROUTE_TO header is an internal header used when routing messages over a cluster bridge. Using it in the CLI for FQQN support was a clever hack, but using the general FQQN support eliminates complexity and makes behavior consistent between standalone JMS clients using FQQN and the CLI. - De-duplicating MessageSerializer initialization boilerplate. - Removing limitation where using an FQQN with an anycast address required the same name for the address and queue. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement >Affects Versions: 2.6.4 >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Fix For: 2.7.0 > > Time Spent: 1.5h > Remaining Estimate: 0h > > Allow clients to send messages directly to a fully-qualified queue rather > than just an address. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16750302#comment-16750302 ] ASF subversion and git services commented on ARTEMIS-1867: -- Commit a4a929a154285116581371fde8a400d0249eb130 in activemq-artemis's branch refs/heads/master from Justin Graham Bertram [ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=a4a929a ] ARTEMIS-1867 fix FQQNOpenWireTest > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement >Reporter: Justin Bertram >Assignee: Justin Bertram >Priority: Major > Fix For: 2.7.0 > > Time Spent: 1h 20m > Remaining Estimate: 0h > > Allow clients to send messages directly to a fully-qualified queue rather > than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16746046#comment-16746046 ] ASF subversion and git services commented on ARTEMIS-1867: -- Commit 61e0354b1a2e7bfd24547eb978bba521fb8abf7a in activemq-artemis's branch refs/heads/master from Justin Graham Bertram [ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=61e0354 ] ARTEMIS-1867 FQQN for producers There's a *slight* semantic change with the behavior of the queue query and binding query to make them consistent with the address query, namely that they will return the name of the queue and the name of the address in every case and the returned names will be not use the FQQN syntax but will be parsed to reflect their actual names in the broker. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16721526#comment-16721526 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user jbertram commented on the issue: https://github.com/apache/activemq-artemis/pull/2434 From what I can tell everything in this PR is sorted now. I'd like to get this in for the upcoming 2.7.0. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711686#comment-16711686 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user jbertram commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239530225 --- 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 -- Both maps are used for routing messages, but they are used for different use-cases which I can't see any overlap between so I don't think there's a problem. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711639#comment-16711639 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239505519 --- 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 -- `bindingsIdMap` and `bindingsNameMap` aren't atomically updated with the same operation because are 2 different maps so I'm expecting that dependently on the timing, querying both could give different results (a `Binding` could be found in one map, but not on the other one). It can be avoided if we always query them when both are stable: is it the case? I hope to have explained it better what I mean: I'm not aware of the context of usage... > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711603#comment-16711603 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user jbertram commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239499976 --- 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<>(); --- End diff -- Got it. FWIW, I just changed the name of the variable here to differentiate it from the new one I added. Given it's been working fine (as far as we know) so far I'd say it should stay the same and we can change it in another PR if necessary. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711594#comment-16711594 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239497231 --- 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<>(); --- End diff -- It won't use Long instances by just primitive longs, so just footprint: if you know that the map won't be that big i suppose that's fine anyway > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711585#comment-16711585 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user jbertram commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239494788 --- 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<>(); --- End diff -- What's the advantage of ConcurrentLongHashMap over ConcurrentHashMap? > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711563#comment-16711563 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r239486300 --- 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<>(); --- End diff -- Why not using a primitive version of this map? We have somewhere LongConcurrentHashMap (used into the journal too) > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16711570#comment-16711570 ] ASF GitHub Bot commented on ARTEMIS-1867: - 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 > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16691434#comment-16691434 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r234540655 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java --- @@ -3178,138 +3187,7 @@ public Queue createQueue(final SimpleString address, final int consumersBeforeDispatch, final long delayBeforeDispatch, final boolean autoCreateAddress) throws Exception { - return createQueue(address, routingType, queueName, filterString, user, durable, temporary, ignoreIfExists, transientQueue, autoCreated, maxConsumers, purgeOnNoConsumers, exclusive, lastValue, lastValueKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, autoCreateAddress, false); - } - - private Queue createQueue(final SimpleString address, --- End diff -- Thanks, i was going to flag about configurationManaged not being present on the other, but have noticed since you've added it, so it shouldn't be an issue. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16691406#comment-16691406 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r234532241 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java --- @@ -3178,138 +3187,7 @@ public Queue createQueue(final SimpleString address, final int consumersBeforeDispatch, final long delayBeforeDispatch, final boolean autoCreateAddress) throws Exception { - return createQueue(address, routingType, queueName, filterString, user, durable, temporary, ignoreIfExists, transientQueue, autoCreated, maxConsumers, purgeOnNoConsumers, exclusive, lastValue, lastValueKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, autoCreateAddress, false); - } - - private Queue createQueue(final SimpleString address, --- End diff -- So afaik, the one being removed is the main one called by bits like config loader etc and invoked more directly by many other code paths, so it would be better to remove the other if any IMO. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16688116#comment-16688116 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user jbertram commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r233854063 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java --- @@ -3178,138 +3187,7 @@ public Queue createQueue(final SimpleString address, final int consumersBeforeDispatch, final long delayBeforeDispatch, final boolean autoCreateAddress) throws Exception { - return createQueue(address, routingType, queueName, filterString, user, durable, temporary, ignoreIfExists, transientQueue, autoCreated, maxConsumers, purgeOnNoConsumers, exclusive, lastValue, lastValueKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, autoCreateAddress, false); - } - - private Queue createQueue(final SimpleString address, --- End diff -- There were two different but nearly identical implementations of createQueue(). I consolidated these into a single method. There should be no semantic differences. > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (ARTEMIS-1867) Support FQQN for producers
[ https://issues.apache.org/jira/browse/ARTEMIS-1867?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16687632#comment-16687632 ] ASF GitHub Bot commented on ARTEMIS-1867: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2434#discussion_r233744603 --- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java --- @@ -3178,138 +3187,7 @@ public Queue createQueue(final SimpleString address, final int consumersBeforeDispatch, final long delayBeforeDispatch, final boolean autoCreateAddress) throws Exception { - return createQueue(address, routingType, queueName, filterString, user, durable, temporary, ignoreIfExists, transientQueue, autoCreated, maxConsumers, purgeOnNoConsumers, exclusive, lastValue, lastValueKey, nonDestructive, consumersBeforeDispatch, delayBeforeDispatch, autoCreateAddress, false); - } - - private Queue createQueue(final SimpleString address, --- End diff -- Viewing from a phone, so might be more obvious if using a pc. But where has this method gone with all its logic? > Support FQQN for producers > -- > > Key: ARTEMIS-1867 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1867 > Project: ActiveMQ Artemis > Issue Type: Improvement > Components: STOMP >Reporter: Justin Bertram >Priority: Major > > Allow STOMP clients to send messages directly to a fully-qualified queue > rather than just an address. -- This message was sent by Atlassian JIRA (v7.6.3#76005)