Skip to content

Commit

Permalink
docs: fix information about storing offset manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasz Prasołek authored and Tomasz Prasołek committed Feb 8, 2024
1 parent 66372cc commit 72e789c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions website/docs/guides/consumers/add-consumers.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ services.AddKafka(kafka => kafka
## Store Offsets Manually

By default, offsets are stored after the handler and middleware execution automatically.
This is the equivalent to configure the consumer as `WithAutoStoreOffsets()`.

To control Offset storing, it's possible to configure using `WithManualStoreOffsets()` as the following example:
To control Offset storing, it's possible to configure using `WithManualMessageCompletion()` as the following example:


```csharp
Expand All @@ -121,7 +120,7 @@ services.AddKafka(kafka => kafka
.AddConsumer(consumer => consumer
.Topic("topic-name")
.WithGroupId("sample-group")
.WithManualStoreOffsets()
.WithManualMessageCompletion()
...
)
)
Expand Down
4 changes: 2 additions & 2 deletions website/docs/guides/migration/from-v2-to-v3.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ For the KafkaFlow engine to adapt to the dynamic change of workers, the way the

To achieve this, a new method in the message context was provided to signal the message completion `.Complete()`. Additionally, a new property called `AutoMessageCompletion` was added to signal if KafkaFlow should signal the message as completed automatically which is the default behavior. This property is useful for scenarios where we don't want to complete the message right away, for example in Batch Consume scenarios.

- Use `WithManualMessageCompletion()` instead of `WithManualStoreOffsets`.
- Use `context.ConsumerContext.Complete()` instead of `context.ConsumerContext.StoreOffset();`.
- Use `WithManualMessageCompletion()` instead of `WithManualStoreOffsets()`.
- Use `context.ConsumerContext.Complete()` instead of `context.ConsumerContext.StoreOffset()`.

### 1.3 Expose Worker Events to Client Applications

Expand Down

0 comments on commit 72e789c

Please sign in to comment.