-
Story
-
Resolution: Unresolved
-
Major
-
None
-
None
The old org.apache.activemq.artemis.jms.management.impl.JMSServerControlImpl has a method listConnectionsAsJSON which returns:
for (RemotingConnection connection : connections) { ServerSession session = jmsSessions.get(connection.getID()); if (session != null) { JSONObject obj = new JSONObject(); obj.put("connectionID", connection.getID().toString()); obj.put("clientAddress", connection.getRemoteAddress()); obj.put("creationTime", connection.getCreationTime()); obj.put("clientID", session.getMetaData("jms-client-id")); obj.put("principal", session.getUsername()); array.put(obj); } }
The newer org.apache.activemq.artemis.core.management.impl.ActiveMQServerControlImpl listConnectionsAsJSON doesn't return the principal information for the user associated with the client:
JsonArrayBuilder array = JsonLoader.createArrayBuilder(); Set<RemotingConnection> connections = this.server.getRemotingService().getConnections(); for (RemotingConnection connection : connections) { JsonObjectBuilder obj = JsonLoader.createObjectBuilder().add("connectionID", connection.getID().toString()).add("clientAddress", connection.getRemoteAddress()).add("creationTime", connection.getCreationTime()).add("implementation", connection.getClass().getSimpleName()).add("sessionCount", this.server.getSessions(connection.getID().toString()).size()); array.add(obj); } return array.build().toString();
Is there some way to bring back this capability?
Getting the principal from the session doesn't always work and necessitates iterating through every connector and getting the session, forcing 100s of jmx calls vs. the previous one call.
- clones
-
ENTMQBR-8282 listConnections Used to return Principal Information
- Backlog
- depends on
-
WFLY-19634 Expose all artemis server sessions via an operation
- Open