clebertsuconic commented on code in PR #5856: URL: https://github.com/apache/activemq-artemis/pull/5856#discussion_r2267816863
########## artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java: ########## @@ -345,10 +338,14 @@ public synchronized void startAcceptors() throws Exception { if (isStarted()) { for (Acceptor a : acceptors.values()) { try { - if (a instanceof NettyAcceptor acceptor && !acceptor.isAutoStart()) { + if (!a.isAutoStart()) { continue; } a.start(); + + if (server.getMetricsManager() != null) { + a.registerMetrics(server.getMetricsManager()); Review Comment: @jbertram if it's too difficult to unregister the metric.. I wouldn't bother that much... as long as you don't re-register in case of a further start.... say.. stop / start / stop start... or even then.. as long as i'ts documented. that's fine.. Of course if it can be fixed.. the better. The case I was concerned was not registering at all in case of a late start.. but even that would be a minor issue IMO. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For additional commands, e-mail: gitbox-h...@activemq.apache.org For further information, visit: https://activemq.apache.org/contact