I added to some existing auto create address logic in the code path which suffices for my test case. It does appear a little hacky to have three xxToUse local variables and the toString messing on simpleString does not look right.
One thought was to pass a null routingtype to this method but it is not clear to me where that decision should be made. Pulling the value from config for the auto creation case does make sense however.
Please review and maybe it is time to consider pulling all of the auto creation logic into one place.
@mtaylor Pushed an update, with the check in the openwire session the change set is smaller and the new tests with an existing address work as expected.
the prefixing remains and the case of multiple routing types is handled already by returning the first entry in the set which may need a revisit when the prefix is handled.