From 529ff00ec2d5b510f498af0aab7a29fd6a16ac00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Praso=C5=82ek?= Date: Thu, 8 Feb 2024 07:19:22 +0100 Subject: [PATCH 1/2] docs: add information about new methods --- website/docs/guides/migration/from-v2-to-v3.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/website/docs/guides/migration/from-v2-to-v3.md b/website/docs/guides/migration/from-v2-to-v3.md index ae8322ae3..545b2a12c 100644 --- a/website/docs/guides/migration/from-v2-to-v3.md +++ b/website/docs/guides/migration/from-v2-to-v3.md @@ -244,6 +244,9 @@ 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();`. + ### 1.3 Expose Worker Events to Client Applications > Related Issues: [#427](https://github.com/Farfetch/kafkaflow/issues/427) From 54af968e310c5110d28552927d4798d1c782bee1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Praso=C5=82ek?= Date: Thu, 8 Feb 2024 18:59:03 +0100 Subject: [PATCH 2/2] docs: fix information about storing offset manually --- website/docs/guides/consumers/add-consumers.md | 5 ++--- website/docs/guides/migration/from-v2-to-v3.md | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/website/docs/guides/consumers/add-consumers.md b/website/docs/guides/consumers/add-consumers.md index 89bf3b824..eb8c1333b 100644 --- a/website/docs/guides/consumers/add-consumers.md +++ b/website/docs/guides/consumers/add-consumers.md @@ -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 @@ -121,7 +120,7 @@ services.AddKafka(kafka => kafka .AddConsumer(consumer => consumer .Topic("topic-name") .WithGroupId("sample-group") - .WithManualStoreOffsets() + .WithManualMessageCompletion() ... ) ) diff --git a/website/docs/guides/migration/from-v2-to-v3.md b/website/docs/guides/migration/from-v2-to-v3.md index 545b2a12c..5d73fd437 100644 --- a/website/docs/guides/migration/from-v2-to-v3.md +++ b/website/docs/guides/migration/from-v2-to-v3.md @@ -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