According to the JMS API Documentation[1], the JMS broker should throw an InvalidClientIDException when a JMS client specifies a duplicate ClientID for a durable subscriber. However HornetQ throws an IllegalStateException instead.
<snip>
JMSException - if the JMS provider fails to set the client ID for this connection due to some internal error.
InvalidClientIDException - if the JMS client specifies an invalid or duplicate client ID.
IllegalStateException - if the JMS client attempts to set a connection's client ID at the wrong time or when it has been administratively configured.
</snip>
[1] http://docs.oracle.com/javaee/6/api/javax/jms/Connection.html#getClientID%28%29