When using NotifyBuilder.from, it is possible to supply both a URI pattern and an actual URI for matching. NotifyBuilder matches actual endpoint URIs against the specified pattern using EndpointHelper.matchEndpoint(URI endpointUri, String pattern), which does either exact or regex matching. Before matching, matchEndpoint will normalize the URI in order to ensure that e.g. query parameter order doesn't matter.
It would be nice if NotifyBuilder.from would attempt to normalize the pattern/URI specified in the "from" method. If it isn't possible to normalize, the pattern can be passed to matchEndpoint without modification, but if the "from" method is used with a concrete URI, query parameter order there can be some surprising behavior during the matching.
For example, given a route like
the following will not match
The reason for this is that Camel will normalize the route URI given in the actual route before passing it to EndpointHelper, but the pattern given to NotifyBuilder is not normalized, so the order of query parameters end up not matching.
It would be good to either update NotifyBuilder so it tries normalizing the URI, or updating EndpointHelper.matchEndpoint, so it tries normalizing both the URI parameter and the pattern parameter.