Description
With fast connection close/creation (like stomp) the client side ephemeral port range can result in duplicate mbean names when close is async. Potential of failed mbean registration due to port reuse.
DEBUG ManagedTransportConnection - Failure reason: javax.management.InstanceAlreadyExistsException: org.apache.activemq:BrokerName=XXXXXX,Type=Connection,ConnectorName=stomp,ViewType=address,Name=/X.X.X.X_52170
Make the registration of an address type mbean configurable so that this case can be avoided. In the main, it is handy to see the remote address in the mbean name, so the default should be to use the remote port. Just the client Id (which default to the connection id, will be used in the mbean name) when use of remote port is not allowed.