This is an automated email from the ASF dual-hosted git repository.
brusdev pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 9e55accb9e ARTEMIS-5770 improve local address formatting
9e55accb9e is described below
commit 9e55accb9e49353986f5c08861b3e261d2159640
Author: Justin Bertram <[email protected]>
AuthorDate: Mon Nov 17 20:37:07 2025 -0600
ARTEMIS-5770 improve local address formatting
---
.../core/remoting/impl/netty/NettyConnection.java | 7 +++----
.../activemq/artemis/core/protocol/ProtocolHandler.java | 5 ++---
.../artemis/core/server/ActiveMQServerLogger.java | 3 +--
docs/user-manual/versions.adoc | 16 +++++++++++++++-
4 files changed, 21 insertions(+), 10 deletions(-)
diff --git
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
index b952d87bbb..2321f3253e 100644
---
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
+++
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyConnection.java
@@ -17,7 +17,6 @@
package org.apache.activemq.artemis.core.remoting.impl.netty;
import java.lang.invoke.MethodHandles;
-import java.net.SocketAddress;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -394,11 +393,11 @@ public class NettyConnection implements Connection {
@Override
public final String getLocalAddress() {
- SocketAddress address = channel.localAddress();
+ String address = SocketAddressUtil.toString(channel.localAddress());
if (address == null) {
return null;
}
- return "tcp://" + IPV6Util.encloseHost(address.toString());
+ return IPV6Util.encloseHost(address);
}
@Override
@@ -469,7 +468,7 @@ public class NettyConnection implements Connection {
@Override
public final String toString() {
- return super.toString() + "[ID=" + getID() + ", local= " +
channel.localAddress() + ", remote=" + getRemoteAddress() + "]";
+ return super.toString() + "[ID=" + getID() + ", local= " +
getLocalAddress() + ", remote=" + getRemoteAddress() + "]";
}
private void closeChannel(final Channel channel, boolean inEventLoop) {
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
index fc6df1214a..b0ed7a167a 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java
@@ -19,7 +19,6 @@ package org.apache.activemq.artemis.core.protocol;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-import java.util.Objects;
import java.util.Set;
import java.util.concurrent.Future;
import java.util.concurrent.ScheduledExecutorService;
@@ -246,7 +245,7 @@ public class ProtocolHandler {
ProtocolManager protocolManagerToUse = protocolMap.get(protocolToUse);
if (protocolManagerToUse == null) {
-
ActiveMQServerLogger.LOGGER.failedToFindProtocolManager(ctx.channel() == null ?
null : ProxyProtocolUtil.getRemoteAddress(ctx.channel()), ctx.channel() == null
? null : Objects.toString(ctx.channel().localAddress(), null), protocolToUse,
protocolMap.keySet().toString());
+
ActiveMQServerLogger.LOGGER.failedToFindProtocolManager(ctx.channel() == null ?
null : ProxyProtocolUtil.getRemoteAddress(ctx.channel()), ctx.channel() == null
? null : SocketAddressUtil.toString(ctx.channel().localAddress()),
protocolToUse, protocolMap.keySet().toString());
return;
}
ConnectionCreator channelHandler =
nettyAcceptor.createConnectionCreator();
@@ -264,7 +263,7 @@ public class ProtocolHandler {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) {
try {
-
ActiveMQServerLogger.LOGGER.failureDuringProtocolHandshake(ctx.channel().localAddress(),
ProxyProtocolUtil.getRemoteAddress(ctx.channel()), cause);
+
ActiveMQServerLogger.LOGGER.failureDuringProtocolHandshake(SocketAddressUtil.toString(ctx.channel().localAddress()),
ProxyProtocolUtil.getRemoteAddress(ctx.channel()), cause);
} finally {
ctx.close();
}
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
index afdff952fa..3216891a00 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServerLogger.java
@@ -19,7 +19,6 @@ package org.apache.activemq.artemis.core.server;
import javax.naming.NamingException;
import javax.transaction.xa.Xid;
import java.io.File;
-import java.net.SocketAddress;
import java.util.List;
import java.util.concurrent.ExecutorService;
@@ -1435,7 +1434,7 @@ public interface ActiveMQServerLogger {
void noPagefullPolicySet(Object address, Object limitBytes, Object
limitMessages);
@LogMessage(id = 224126, value = "Failure during protocol handshake on
connection to {} from {}", level = LogMessage.Level.ERROR)
- void failureDuringProtocolHandshake(SocketAddress localAddress, String
remoteAddress, Throwable e);
+ void failureDuringProtocolHandshake(String localAddress, String
remoteAddress, Throwable e);
// Note the custom loggerName rather than the overall LogBundle-wide
definition used by other methods.
@LogMessage(id = 224127, value = "Message dispatch from paging is blocked.
Address {}/Queue {} will not read any more messages from paging until pending
messages are acknowledged. "
diff --git a/docs/user-manual/versions.adoc b/docs/user-manual/versions.adoc
index 1fe3690eea..58d8aa7638 100644
--- a/docs/user-manual/versions.adoc
+++ b/docs/user-manual/versions.adoc
@@ -13,6 +13,20 @@ NOTE: If the upgrade spans multiple versions then the steps
from *each* version
NOTE: Follow the general upgrade procedure outlined in the
xref:upgrading.adoc#upgrading-the-broker[Upgrading the Broker] chapter in
addition to any version-specific upgrade instructions outlined here.
+== 2.45.0
+
+https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315920&version=xxx[Full
release notes]
+
+=== Highlights
+
+* ...
+
+=== Upgrading from 2.44.0
+
+* Due to https://issues.apache.org/jira/browse/ARTEMIS-5770[ARTEMIS-5770] the
formatting of the "Local Address" field has changed.
+This field is available on the "Connections," "Sessions," "Consumers," and
"Producers" tabs.
+This may impact users filtering results based on this field.
+
== 2.44.0
https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12315920&version=12356324[Full
release notes]
@@ -35,7 +49,7 @@ More details available xref:proxy-protocol.adoc[here].
* It is now possible to remove or add acceptors or a running broker.
https://issues.apache.org/jira/browse/ARTEMIS-5609[Click here] for more details.
* AMQP Federation now supports filtering.
https://issues.apache.org/jira/browse/ARTEMIS-5625[Click here] for more details.
-=== Upgrading
+=== Upgrading from 2.42.0
* As part of the work for
https://issues.apache.org/jira/browse/ARTEMIS-5557[ARTEMIS-5557] to report
executor service metrics the names of many ActiveMQ-related threads were
changed to be more clear and consistent.
This will be visible, for example, when inspecting thread dumps or if you
happen to include the thread name in your logging output.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact