Hi

Its a pattern and not an endpoint uri, eg you can use sjms* to match
all jsms components etc.

Why do you want to match on the query parameters, why not just say

sjms2://queue:my-queue-name*


On Thu, Sep 26, 2019 at 7:43 AM Stig Døssing
<stig.doss...@systematic.com> wrote:
>
> Hi,
>
> I'm trying to use NotifyBuilder for a test, and am running into a matching 
> issue regarding the "from" method. My route looks like
>
> From( "sjms2:queue:my-queue-name?transacted=true&consumerCount=1")
> //processing here
>
> I use NotifyBuilder like this:
>
> NotifyBuilder notifyBuilder = new NotifyBuilder(context)
>                 
> .from("sjms2:queue:my-queue-name?transacted=true&consumerCount=1")
>                 .whenDone(1)
>                 .create()
>
> Followed by a call to matches(). When I run the test, the NotifyBuilder fails 
> to match.
> The NotifyBuilder uses the EndpointHelper to match from endpoint URIs, and 
> the call I'm seeing return false has the following parameters:
>
> EndpointHelper.matchEndpoint(context, uri = 
> "sjms2://queue:my-queue-name?consumerCount=1&transacted=true", pattern = 
> "sjms2:queue:my-queue-name?transacted=true&consumerCount=1")
>
> I would expect these values to match, but the EndpointHelper handles 
> reordered query parameters by normalizing the "uri" parameter, but not the 
> "pattern" parameter. As the "uri" parameter is already normalized, these 
> values end up not matching.
>
> Should I raise an issue for this, or is this a known limitation?



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to