[ 
https://issues.apache.org/jira/browse/STORM-3517?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stig Rohde Døssing closed STORM-3517.
-------------------------------------
    Resolution: Fixed

Sorry, this was supposed to be a Camel issue.

> NotifyBuilder.from does not normalize endpoint URI
> --------------------------------------------------
>
>                 Key: STORM-3517
>                 URL: https://issues.apache.org/jira/browse/STORM-3517
>             Project: Apache Storm
>          Issue Type: Improvement
>    Affects Versions: 3.0.0
>            Reporter: Stig Rohde Døssing
>            Priority: Minor
>
> 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
> from("sjms:queue:my-queue?transacted=true&consumerCount=1")
> the following will not match
> new NotifyBuilder()
> .from("sjms:queue:my-queue?transacted=true&consumerCount=1")
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to