Github user michaelandrepearce commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/2116#discussion_r191777420
--- Diff:
artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQConnection.java
---
@@ -263,6 +264,8 @@ private void validateClientID(ClientSession
validateSession, String clientID) th
} catch (ActiveMQException e) {
if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) {
throw new InvalidClientIDException("clientID=" + clientID + "
was already set into another connection");
+ } else {
+ throw new InvalidClientIDException("Error setting clientID=" +
clientID + ": " + e.getMessage());
--- End diff --
The original exception here may not be related to InvalidClientId, seems a
bit dangerous to catchall and throw like this. Maybe bubble up or convert the
exception
---