We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There is no option to manually commit offsets when comsuming kafka events.
Provide commitOffsets function from native kafkajs via ClientKafka implementation.
commitOffsets
constructor(@Inject('KAFKA') private readonly client: ClientKafka) {} ... @EventPattern('pattern') consumeEvent(@Payload() data: any, @Ctx() context: KafkaContext) { this.client.commitOffsets(...) }
If this idea gets approval I will start working on a PR and I am happy to update the docs as well.
Developers will be able to manually commit offsets instead of auto commit. In production this is essential when using kafka.
Need to manually commit offsets when working with kafka in production.
The text was updated successfully, but these errors were encountered:
Contributions are more than welcome!
Sorry, something went wrong.
These are all the changes I am planing to make to ClientKafka.
ClientKafka
public commitOffsets( topicPartitions: TopicPartitionOffsetAndMetadata[], ): Promise<void> { return this.consumer.commitOffsets(topicPartitions); }
Does such a simple function require a test?
I think no tests are needed in this case.
feat(microservices): add commit-offsets function to clientkafka
2ff8f70
This commit closes issue nestjs#9258.
Let's track this here #9270
No branches or pull requests
Is there an existing issue that is already proposing this?
Is your feature request related to a problem? Please describe it
There is no option to manually commit offsets when comsuming kafka events.
Describe the solution you'd like
Provide
commitOffsets
function from native kafkajs via ClientKafka implementation.If this idea gets approval I will start working on a PR and I am happy to update the docs as well.
Teachability, documentation, adoption, migration strategy
Developers will be able to manually commit offsets instead of auto commit. In production this is essential when using kafka.
What is the motivation / use case for changing the behavior?
Need to manually commit offsets when working with kafka in production.
The text was updated successfully, but these errors were encountered: