Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kalyvasio committed Jul 3, 2024
1 parent c057664 commit ae2f079
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,6 @@ ObjectId using new mongoose.
- Changes in default config: istioTraceHeaders and headerPropagation are deprecated in favor of a generic propagatedHeaders
- Methods kafka.send that was deprecated is removed. Use kafka.producer.send instead
- Mongoose migrated to v7 which has breaking changes see [here](https://mongoosejs.com/docs/7.x/docs/migrating_to_7.html)

### Migrating from orka 4.x to 5.x
- Support for KafkaJS version pre 2.x.x is dropped.
21 changes: 21 additions & 0 deletions docs/integrations/kafka.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,24 @@ You also need to specify the new group ids in your consumers while previously yo
Once the new group ids are created you can remove the code that copies their offsets from old group ids. This is causing no issues thought as it doesn't do anything if the new group ids are found with offsets set.

If you are using the renameGroupIds (before creating your consumers) your consumers will continue reading messages from the offset specified from the old groupId regardless if you set the fromBeginning configuration. FromBeginning configuration will be used if the groupId, topic is not found in kafka.

## Migrating from orka < 5.x.x

Since Orka 5.x.x, the required KafkaJS version is ^2.x.x
(more info on the KafkaJS changes [here](https://kafka.js.org/docs/migration-guide-v2.0.0))

The only possible implication is the update of the DefaultPartitioner (https://kafka.js.org/docs/migration-guide-v2.0.0#producer-new-default-partitioner). This may case
issues in partition-aware environments, since some messages may be produced in different partitions than they would with the previous default partitioner.

By default, Orka ^5.x.x will use the new DefaultPartitioner (previously named JavaCompatiblePartitioner).
You can use the previous DefaultPartitioner (now renamed to LegacyPartitioner) with:

```js
import { Partitioners } from 'kafkajs';

builder({…some static options here…})
...
.withKafka({ createPartitioner: Partitioners.LegacyPartitioner })
.start(8080);
```

0 comments on commit ae2f079

Please sign in to comment.