A default branch is the fallback path in a split Kafka Streams topology. It receives every record that fails to match the configured branch predicates. section 6.6.2
Build the branching flow by:
- Calling KStream.split() to obtain a BranchedKStream. section 6.6.2
- Adding branch() calls whose predicates route matching records to branch processors. section 6.6.2
- Calling defaultBranch() to retain unmatched records, or noDefaultBranch() to drop them. section 6.6.2
- Keeping the same key and value types across every branch. section 6.6.2
Retail purchase routing
After routing coffee purchases to coffee-topic and electronics purchases to electronics, send the default branch to purchases. That stream handles every other department. section 6.6.2
