Skip to content

Commit

Permalink
Merge pull request #189 from GetFeedback/documentation/routing
Browse files Browse the repository at this point in the history
Add documentation for routing capability
  • Loading branch information
Stefano Guerrini authored Aug 25, 2022
2 parents d074ad9 + dfefa85 commit 900123e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/features/routing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Routing

Permits routing records to specific topic using [`jmespath`](https://jmespath.org/).
The routes are declared under `routes` with `jmesPath` as a matching condition and `topic` as the name for the topic to route the message to.

If no route is matched, the record lands in `errorTopic`
### Usage examples

A filter-like JMESPath evaluation

```yaml
- name: produceActionToSinkTopic
type: dev.vox.platform.kahpp.configuration.topic.ProduceToTopicByRoute
config:
errorTopic: error
routes:
- jmesPath: value.actionType == 'email'
topic: email
- jmesPath: value.actionType == 'salesforce'
topic: salesforce
- jmesPath: value.actionType == 'slack'
topic: slack
```
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ nav:
- Filters: features/filters.md
- Http: features/http.md
- Throttle: features/throttle.md
- Routing: features/routing.md
- Developer Guide:
- Spring Boot Starter: developer-guide/spring-boot-starter.md

0 comments on commit 900123e

Please sign in to comment.