Skip to content

Commit

Permalink
Updating README with pre-conditions for Stream Joins
Browse files Browse the repository at this point in the history
  • Loading branch information
mjayprateek committed Oct 13, 2020
1 parent cfe521d commit 7cb2a03
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,19 @@ All alpha features in this doc will contain an Alpha feature tag.
Stream joins is an alpha feature, and we recommend that you do not use it in production. It's API contract might likely change in the future.

Refer to the alpha features section on how to enable Stream joins, set the keyword `:stream-joins` to `true` to enable it.

Before starting with the code changes, please make sure that the kafka topics one intends to join via Kafka Stream DSL's
join feature satisfies the following pre-conditions
- The number of partitions for both the topics should be exactly same.
- Both the topics should be co-partitioned, i.e. If the messages which are produced to these
topics share the exact same key, these messages should land up in the same parition index. The implications
are that while producing the data to these topics, the developer should take care to use the same Kafka Producer
Client for both the topics. If that's not the case, please do that before attempting a Stream Joins.

For more details and deeper explanation about the above points, one can refer this guide:
[Join Co-partitioning Requirements](https://kafka.apache.org/23/documentation/streams/developer-guide/dsl-api.html#join-co-partitioning-requirements)


This will allow an actor to join messages from 2 topics into 1 result. To be able to use stream joins just add the configuration below to your `config.edn`

```clojure
Expand Down

0 comments on commit 7cb2a03

Please sign in to comment.