Matcher matcher = DESTINATION_PATTERN.matcher(aDestionation);
if (!matcher.matches()) {
throw new IllegalArgumentException("Invalid destination address: " + aDestionation);
}
DestinationType destType = DestinationType.QUEUE;
if (!StringUtils.isBlank(matcher.group(2))) {
destType = DestinationType.parse(matcher.group(2).trim());
if (destType == null) {
throw new IllegalArgumentException("Invalid destination type: " + matcher.group(2));
}