[jira] [Commented] (ARTEMIS-4650) CLI command PWD showing current folders.

2024-02-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17819408#comment-17819408
 ] 

ASF subversion and git services commented on ARTEMIS-4650:
--

Commit 4c0ed678979ed970927b27dae273825ea5359091 in activemq-artemis's branch 
refs/heads/main from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=4c0ed67897 ]

ARTEMIS-4650 PWD CLI Command

little tool showing current folders on the CLI. Useful to figure out where 
you're at when using the shell.

I get myself typing pwd all the time I am using the CLI, trying to figure out 
what is my current location and broker being used.
this would be useful to make sure you are going to use the right broker when 
multiple CLI instances are running from multiple terminals.


> CLI command PWD showing current folders.
> 
>
> Key: ARTEMIS-4650
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4650
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Priority: Major
> Fix For: 2.33.0
>
>
> on my test workflow, I will in many occasions have many terminals open, with 
> CLI terminals. After some time I won't know which server is the CLI connected 
> with.
> and I will find myself typing pwd all the time as it's my mental model to 
> figure ou where I'm at at the terminal windows.
> So, I decided to just create a command pwd, that will show the current 
> folder, home folder and artemis instance in the terminal.
> I have been using and it's been very helpful to me.. a little tool that 
> helped me with my own workflow.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (ARTEMIS-4645) Update AMQP broker connection tests to use better connector names

2024-02-21 Thread Timothy A. Bish (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy A. Bish resolved ARTEMIS-4645.
--
Resolution: Fixed

> Update AMQP broker connection tests to use better connector names
> -
>
> Key: ARTEMIS-4645
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4645
> Project: ActiveMQ Artemis
>  Issue Type: Task
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Update various AMQP broker connection tests to use more unique names for 
> broker connections and policies to provide more details in logs of the 
> various tests that make them identifiable



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Resolved] (ARTEMIS-4654) Misleading error message while connecting to host with underscore

2024-02-21 Thread Justin Bertram (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Bertram resolved ARTEMIS-4654.
-
Resolution: Information Provided

> Misleading error message while connecting to host with underscore
> -
>
> Key: ARTEMIS-4654
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4654
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 2.31.0
>Reporter: Lauri Kimmel
>Priority: Major
>
> Underscore in hostname produces unexpected error message. See details below.
> It's problematic since
>  # error message is misleading
>  # hostname with underscore is valid for certain setups. I.e in Docker 
> compose / swarm environments.
>  # underscore in hostname works for different other client libraries. Tested 
> with Postgres, InfluxDB, Redis 
> —
> Code
> {code:java}
> ActiveMQConnectionFactory factory = new 
> ActiveMQConnectionFactory("tcp://local_host:61616");
> factory.createConnection();
> {code}
> produces output
> {code:java}
> WARN  [org.apa.act.art.cor.client] (main) AMQ212007: connector.create or 
> connectorFactory.createConnector should never throw an exception, 
> implementation is badly behaved, but we will deal with it anyway.: 
> java.lang.IllegalArgumentException: port out of range:-1
>     at 
> java.base/java.net.InetSocketAddress.checkPort(InetSocketAddress.java:152)
>     at java.base/java.net.InetSocketAddress.(InetSocketAddress.java:233)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:874)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:866)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:848)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1212)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1333)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1253)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1496)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1074)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:959)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:279)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:295)
>     at 
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:709)
>     at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:865)
>     at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:284)
>     at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:279)
> ...
> {code}
> while code 
> {code:java}
> ActiveMQConnectionFactory factory = new 
> ActiveMQConnectionFactory("tcp://local-host:61616");
> factory.createConnection();
> {code}
> produces output
> {code:java}
> ERROR [org.apa.act.art.cor.client] (main) AMQ214016: Failed to create netty 
> connection: java.net.UnknownHostException: local-host
>     at 
> java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:801)
>     at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
>     at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367)
>     at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301)
>     at java.base/java.net.InetAddress.getByName(InetAddress.java:1251)
>     at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:156)
>     at io.netty.util.internal.SocketUtils$8.run(SocketUtils.java:153)
>     at 
> java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
>     at io.netty.util.internal.SocketUtils.addressByName(SocketUtils.java:153)
>     at 
> io.netty.resolver.DefaultNameResolver.doResolve(DefaultNameResolver.java:41)
>     at 
> io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:61)
>     at 
> io.netty.resolver.SimpleNameResolver.resolve(SimpleNameResolver.java:53)
>     at 
> 

[jira] [Commented] (ARTEMIS-4654) Misleading error message while connecting to host with underscore

2024-02-21 Thread Justin Bertram (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17819367#comment-17819367
 ] 

Justin Bertram commented on ARTEMIS-4654:
-

The fundamental problem comes from underlying API which the broker uses to 
parse the connection URI. The broker uses 
[{{java.net.URI}}|https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/net/URI.html]
 which doesn't support underscores in the host. For example, this code:
{code:java}
URI uri = new URI("tcp://local_host:61616");
System.out.println(uri.getHost());
System.out.println(uri.getPort());{code}
Results in this output:
{noformat}
null
-1{noformat}
Whereas this code:
{code:java}
URI uri = new URI("tcp://local-host:61616");
System.out.println(uri.getHost());
System.out.println(uri.getPort());{code}
Results in this output:
{noformat}
local-host
61616{noformat}
The "misleading" error is categorically different from the other error you're 
seeing. The "misleading" error is fundamentally caused by a failure to parse 
the connection URI which results in a port number of {{{}-1{}}}. The other 
error is simply an inability to find the host {{local-host}} on the network 
(since the host is valid syntactically).

At this point I'm not sure what, if anything, can be done to support hosts with 
{{_}} in the connection URI. However, you should be able to work-around the 
issue by avoid the URI altogether, e.g.:
{code:java}
Map params = new HashMap<>();
params.put(TransportConstants.HOST_PROP_NAME, "local_host");
params.put(TransportConstants.PORT_PROP_NAME, "61616");
new ActiveMQConnectionFactory(false, new 
TransportConfiguration(NettyConnectorFactory.class.getCanonicalName(), 
params));{code}

> Misleading error message while connecting to host with underscore
> -
>
> Key: ARTEMIS-4654
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4654
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: Configuration
>Affects Versions: 2.31.0
>Reporter: Lauri Kimmel
>Priority: Major
>
> Underscore in hostname produces unexpected error message. See details below.
> It's problematic since
>  # error message is misleading
>  # hostname with underscore is valid for certain setups. I.e in Docker 
> compose / swarm environments.
>  # underscore in hostname works for different other client libraries. Tested 
> with Postgres, InfluxDB, Redis 
> —
> Code
> {code:java}
> ActiveMQConnectionFactory factory = new 
> ActiveMQConnectionFactory("tcp://local_host:61616");
> factory.createConnection();
> {code}
> produces output
> {code:java}
> WARN  [org.apa.act.art.cor.client] (main) AMQ212007: connector.create or 
> connectorFactory.createConnector should never throw an exception, 
> implementation is badly behaved, but we will deal with it anyway.: 
> java.lang.IllegalArgumentException: port out of range:-1
>     at 
> java.base/java.net.InetSocketAddress.checkPort(InetSocketAddress.java:152)
>     at java.base/java.net.InetSocketAddress.(InetSocketAddress.java:233)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:874)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:866)
>     at 
> org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.createConnection(NettyConnector.java:848)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.openTransportConnection(ClientSessionFactoryImpl.java:1212)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1333)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.createTransportConnection(ClientSessionFactoryImpl.java:1253)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.establishNewConnection(ClientSessionFactoryImpl.java:1496)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnection(ClientSessionFactoryImpl.java:1074)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.getConnectionWithRetry(ClientSessionFactoryImpl.java:959)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:279)
>     at 
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.connect(ClientSessionFactoryImpl.java:295)
>     at 
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:709)
>     at 
> org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.createConnectionInternal(ActiveMQConnectionFactory.java:865)
>     at 
> 

[jira] [Resolved] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread Robbie Gemmell (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robbie Gemmell resolved ARTEMIS-4653.
-
Resolution: Fixed

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906287=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906287
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 16:53
Start Date: 21/Feb/24 16:53
Worklog Time Spent: 10m 
  Work Description: gemmellr merged PR #4829:
URL: https://github.com/apache/activemq-artemis/pull/4829




Issue Time Tracking
---

Worklog Id: (was: 906287)
Time Spent: 1h 50m  (was: 1h 40m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17819323#comment-17819323
 ] 

ASF subversion and git services commented on ARTEMIS-4653:
--

Commit 91556729f13c8d1e6a9d077ddacf63e00ffb46dc in activemq-artemis's branch 
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=91556729f1 ]

ARTEMIS-4653 Create federation consumers for specific queue consumer filters

When Queue consumers attach with filters use those instead of the Queue
filter to filter the messages that are federated to avoid stranding of
messages on the local broker. This will result in multiple federation
consumers if the various attached local consumers all use different
filters but does keep unwanted messages on the remote so that consumers
there can consume those.


> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906285=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906285
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 16:49
Start Date: 21/Feb/24 16:49
Worklog Time Spent: 10m 
  Work Description: tabish121 commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1957271778

   Ran the full test suite, no new failures




Issue Time Tracking
---

Worklog Id: (was: 906285)
Time Spent: 1h 40m  (was: 1.5h)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906284=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906284
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 16:48
Start Date: 21/Feb/24 16:48
Worklog Time Spent: 10m 
  Work Description: tabish121 commented on code in PR #4829:
URL: https://github.com/apache/activemq-artemis/pull/4829#discussion_r1497916285


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/federation/AMQPFederation.java:
##
@@ -151,6 +151,16 @@ public synchronized boolean isStarted() {
 */
public abstract int getLargeMessageThreshold();
 
+   /**
+* @return the true if the federation should ignore filters on queue 
consumers.
+*/
+   public abstract boolean isIgnoreQueueConsumerFilters();
+
+   /**
+* @return the true if the federation should support priorities on queue 
consumers.

Review Comment:
   Right, thanks. Fixing that





Issue Time Tracking
---

Worklog Id: (was: 906284)
Time Spent: 1.5h  (was: 1h 20m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906283=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906283
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 16:46
Start Date: 21/Feb/24 16:46
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4829:
URL: https://github.com/apache/activemq-artemis/pull/4829#discussion_r1497776160


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/federation/AMQPFederation.java:
##
@@ -151,6 +151,16 @@ public synchronized boolean isStarted() {
 */
public abstract int getLargeMessageThreshold();
 
+   /**
+* @return the true if the federation should ignore filters on queue 
consumers.
+*/
+   public abstract boolean isIgnoreQueueConsumerFilters();
+
+   /**
+* @return the true if the federation should support priorities on queue 
consumers.

Review Comment:
   should ignore?





Issue Time Tracking
---

Worklog Id: (was: 906283)
Time Spent: 1h 20m  (was: 1h 10m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906269=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906269
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 14:33
Start Date: 21/Feb/24 14:33
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956785152

   @tabish121 well.. it's up to you.. in my case running big workloads like 
users would have been instrumental on finding real issues to me.
   
   tests like these guarantee mechanics but usually issues happen in real 
workloads.




Issue Time Tracking
---

Worklog Id: (was: 906269)
Time Spent: 1h 10m  (was: 1h)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906262=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906262
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 14:04
Start Date: 21/Feb/24 14:04
Worklog Time Spent: 10m 
  Work Description: tabish121 commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956723791

   > Yes.. I saw those.. but wouldn't make sense to add something that would 
simulate the load of an user, a soak test performing some load?
   
   I don't see any benefit no, the code tests the mechanics at the protocol 
level to ensure it behaves as expected so unless the brokers innate ability 
handle Queueing is broken I don't know what you would be testing.  




Issue Time Tracking
---

Worklog Id: (was: 906262)
Time Spent: 1h  (was: 50m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906261=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906261
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 13:56
Start Date: 21/Feb/24 13:56
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956707701

   Yes.. I saw those.. but wouldn't make sense to add something that would 
simulate the load of an user, a soak test performing some load?




Issue Time Tracking
---

Worklog Id: (was: 906261)
Time Spent: 50m  (was: 40m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4651) Performance improvements on Mirror and Paging

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4651?focusedWorklogId=906254=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906254
 ]

ASF GitHub Bot logged work on ARTEMIS-4651:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 13:31
Start Date: 21/Feb/24 13:31
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4827:
URL: https://github.com/apache/activemq-artemis/pull/4827#discussion_r1497556085


##
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java:
##
@@ -0,0 +1,479 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.protocol.amqp.connect.mirror;
+
+import java.lang.invoke.MethodHandles;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.LongSupplier;
+
+import io.netty.util.collection.LongObjectHashMap;
+import org.apache.activemq.artemis.api.core.Message;
+import org.apache.activemq.artemis.api.core.QueueConfiguration;
+import org.apache.activemq.artemis.api.core.SimpleString;
+import org.apache.activemq.artemis.core.io.IOCriticalErrorListener;
+import org.apache.activemq.artemis.core.journal.Journal;
+import org.apache.activemq.artemis.core.journal.RecordInfo;
+import org.apache.activemq.artemis.core.journal.collections.JournalHashMap;
+import 
org.apache.activemq.artemis.core.journal.collections.JournalHashMapProvider;
+import org.apache.activemq.artemis.core.paging.PagingStore;
+import org.apache.activemq.artemis.core.paging.cursor.PageSubscription;
+import org.apache.activemq.artemis.core.paging.cursor.PagedReference;
+import org.apache.activemq.artemis.core.paging.impl.Page;
+import 
org.apache.activemq.artemis.core.persistence.impl.journal.JournalRecordIds;
+import 
org.apache.activemq.artemis.core.persistence.impl.journal.OperationContextImpl;
+import 
org.apache.activemq.artemis.core.persistence.impl.journal.codec.AckRetry;
+import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
+import org.apache.activemq.artemis.core.server.ActiveMQComponent;
+import org.apache.activemq.artemis.core.server.ActiveMQScheduledComponent;
+import org.apache.activemq.artemis.core.server.ActiveMQServer;
+import org.apache.activemq.artemis.core.server.MessageReference;
+import org.apache.activemq.artemis.core.server.Queue;
+import org.apache.activemq.artemis.core.server.RoutingContext;
+import org.apache.activemq.artemis.core.server.impl.AckReason;
+import org.apache.activemq.artemis.core.server.impl.AddressInfo;
+import org.apache.activemq.artemis.core.server.mirror.MirrorController;
+import org.apache.activemq.artemis.core.transaction.Transaction;
+import org.apache.activemq.artemis.core.transaction.impl.TransactionImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AckManager implements ActiveMQComponent {
+
+   // we first retry on the queue a few tiems
+   public static final short MIN_QUEUE_ATTEMPT = 4;

Review Comment:
   I will rename this to MAX_QUEUE_ATTEMPT
   
   
   and If I'm able to add a configuration element for the AckManager, perhaps I 
could configure these two attributes.





Issue Time Tracking
---

Worklog Id: (was: 906254)
Time Spent: 20m  (was: 10m)

> Performance improvements on Mirror and Paging
> -
>
> Key: ARTEMIS-4651
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4651
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Before this change, sends were not paged at the SNF. They are now copied.
> I also added a different scheme for retrying messages in a batches. A 
> collection with pending IDs is created and a few retries are performed 

[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906251=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906251
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 13:19
Start Date: 21/Feb/24 13:19
Worklog Time Spent: 10m 
  Work Description: tabish121 commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956635766

   > Looks good to me...
   > 
   > although I would have added either a soakTest simulating an user's 
workload. or at least an integration test.
   
   There are six added integration tests




Issue Time Tracking
---

Worklog Id: (was: 906251)
Time Spent: 40m  (was: 0.5h)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906244=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906244
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 13:12
Start Date: 21/Feb/24 13:12
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956622751

   Looks good to me...
   
   
   although I would have added either a soakTest simulating an user's workload. 
or at least an integration test.




Issue Time Tracking
---

Worklog Id: (was: 906244)
Time Spent: 0.5h  (was: 20m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4653) AMQP Federation should apply queue consumer filters for demand

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4653?focusedWorklogId=906237=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906237
 ]

ASF GitHub Bot logged work on ARTEMIS-4653:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 12:47
Start Date: 21/Feb/24 12:47
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4829:
URL: 
https://github.com/apache/activemq-artemis/pull/4829#issuecomment-1956579336

   there's a typo on the commit messages. Word keep misspelled as keep
   
   >> filters but does keop unwanted messages




Issue Time Tracking
---

Worklog Id: (was: 906237)
Time Spent: 20m  (was: 10m)

> AMQP Federation should apply queue consumer filters for demand
> --
>
> Key: ARTEMIS-4653
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4653
> Project: ActiveMQ Artemis
>  Issue Type: Improvement
>  Components: AMQP
>Affects Versions: 2.32.0
>Reporter: Timothy A. Bish
>Assignee: Timothy A. Bish
>Priority: Minor
> Fix For: 2.33.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> For Queue federation the federation consumers should apply a consumer defined 
> filter over the Queue defined filter to avoid pulling message across the link 
> that won't be deliverable.  Add options for disabling this and also disabling 
> per consumer consumer priority tracking to allow for reduction of federation 
> links when desired.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4652) Rollback of XAResource implementation should never return XA_RETRY

2024-02-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4652?focusedWorklogId=906236=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-906236
 ]

ASF GitHub Bot logged work on ARTEMIS-4652:
---

Author: ASF GitHub Bot
Created on: 21/Feb/24 12:45
Start Date: 21/Feb/24 12:45
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4828:
URL: https://github.com/apache/activemq-artemis/pull/4828#discussion_r1497478340


##
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionImpl.java:
##
@@ -1901,18 +1901,10 @@ public void rollback(final Xid xid) throws XAException {
  workDone = false;
   } catch (XAException xae) {
  throw xae;
-  } catch (ActiveMQException e) {
- if (e.getType() == ActiveMQExceptionType.UNBLOCKED || e.getType() == 
ActiveMQExceptionType.CONNECTION_TIMEDOUT || e.getType() == 
ActiveMQExceptionType.SHUTDOWN_ERROR) {
-// Unblocked on failover
-throw new XAException(XAException.XA_RETRY);
- }
-
- // This should never occur
- XAException xaException = new XAException(XAException.XAER_RMFAIL);
- xaException.initCause(e);
- throw xaException;
   } catch (Throwable t) {
- // This could occur if the TM interrupts the thread
+ if (logger.isTraceEnabled()) {
+logger.trace("Rollback failed:: {}", convert(xid), t);
+ }
  XAException xaException = new XAException(XAException.XAER_RMFAIL);

Review Comment:
   @ehsavoie should we merge this or wait your tests then?





Issue Time Tracking
---

Worklog Id: (was: 906236)
Time Spent: 40m  (was: 0.5h)

> Rollback of XAResource implementation should never return XA_RETRY
> --
>
> Key: ARTEMIS-4652
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4652
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Reporter: Justin Bertram
>Assignee: Justin Bertram
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> According to [the XA 
> spec|https://pubs.opengroup.org/onlinepubs/009680699/toc.pdf] {{XA_RETRY}} is 
> not a valid response from {{xa_rollback}}. We should return {{XAER_RMFAIL}} 
> instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)