Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For example to match exact you can use weaveById("foo") which will match only the id in the route which has the value "foo".
The wildcard is when the pattern ends with a * char, such as: weaveById("foo*") which will match any id's starting with "foo", such as foo, foobar, foobie and so forth.
The regular expression is more advanced and allows you to match multiple ids, such as weaveById("(foo|bar)") which will match both "foo" and "bar".

Tip

If you try to match a pattern on an exact endpoint uri, then mind that URI options ordering may influence, and hence its best to match by wildcard. For example:

Code Block

mockEndpointsAndSkip("activemq:queue:foo?*")

To match the foo queue and disregard any options.

Using weaveById

The weaveById allows you to manipulate the route, for example by replacing a node with other nodes. The following methods is available:

...