[ https://issues.apache.org/jira/browse/DISPATCH-875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16253672#comment-16253672 ]
ASF GitHub Bot commented on DISPATCH-875: ----------------------------------------- Github user kgiusti commented on a diff in the pull request: https://github.com/apache/qpid-dispatch/pull/218#discussion_r151166644 --- Diff: doc/new-book/routing.adoc --- @@ -213,11 +213,30 @@ address { } ---- -`prefix`:: The address prefix. All messages that match this prefix will be distributed according to the distribution pattern you specify. +`prefix` | `pattern`:: The address or group of addresses to which the address settings should be applied. You can specify a prefix to match an exact address or segment of an address. Alternatively, you can specify a pattern to match an address using wildcards. + //tag::prefix-matching[] -The prefix can match either an exact address or a segment within an address that is delimited by either a `.` or `/` character. For example, the prefix `my_address` would match the address `my_address` as well as `my_address.1` and `my_address/1`. However, it would not match `my_address1`. +A _prefix_ matches either an exact address or a segment within an address that is delimited by either a `.` or `/` character. For example, the prefix `my_address` would match the address `my_address` as well as `my_address.1` and `my_address/1`. However, it would not match `my_address1`. //end::prefix-matching[] ++ +//tag::pattern-matching[] +A _pattern_ matches an address that corresponds to a pattern. A pattern is a sequence of words delimited by either a `.` or `/` character. You can use wildcard characters to represent a word. The `*` character matches exactly one word, and the `#` character matches any sequence of zero or more words. ++ +The following table shows some examples of address patterns: ++ +[cols="25,75"] +|=== +| This pattern... | Matches... +| `news` | `news` +| `news/*/sports` | `news/europe/sports` and `news/usa/sports`, but not `news` or `news/europe/fr/sports` +| `news/#` | `news`, `news/europe`, `news/usa`, `news/usa/sports` +|=== ++ +[NOTE] +==== +You can convert a `prefix` value to a `pattern` by appending `/\#` to it. For example, the prefix `a/b/c` is equivalent to the pattern `a/b/c/#`. +==== +//end::pattern-matching[] --- End diff -- Would it be possible to add an additional note to urge users to consistently use either '.' or '/' as the word separator and not mix both? IOW if using '/' don't use '.' in the address and vice versa? > Document address and link route wildcards > ----------------------------------------- > > Key: DISPATCH-875 > URL: https://issues.apache.org/jira/browse/DISPATCH-875 > Project: Qpid Dispatch > Issue Type: Bug > Components: Documentation > Affects Versions: 1.1.0 > Reporter: Ben Hardesty > Assignee: Ben Hardesty > > Update Dispatch Router doc to describe how to define groups of addresses > using the new "pattern" address attribute. -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org