Comments (5)
Indeed that phrase can use some clarification. Async processing in that case refers to processing where order is not preserved like Blocking with ordered=false, or RunOnVirtualThread.
The message loss scenario is not that complicated really:
Imagine receiving 3 records from a topic-partition with offsets 3,4,5 and they are concurrently processed. If the processing of 5 gets completed and it gets committed back to Kafka, you may have an error during processing 4 and you'd never receive it again, because you've already committed a later offset.
Throttled strategy prevents exactly this case by tracking processed offsets and committing offsets later.
Hope this clarifies.
from quarkus.
/cc @alesj (kafka), @cescoffier (kafka), @ozangunalp (kafka)
from quarkus.
You added a link to a Zulip discussion, please make sure the description of the issue is comprehensive and doesn't require accessing Zulip
This message is automatically generated by a bot.
from quarkus.
thanks for the clarification. I can submit a doc PR if you want.
an alternative enhancement would be to provide a strategy "latest-consecutive-message" to avoid message loss. but I am not sure this would add a lot of value compared to throttled.
from quarkus.
Hi, I believe I wrote the original documentation. At that time with latest
if the user's code returned a completed future before acking
the record then data could be lost (the record's offset could be committed before processing actually takes place). With throttled
that is not the case since the offsets are updates only after acking
. This presupposes an async method signature:
@Incoming("my-data")
@Acknowledgment(Acknowledgment.Strategy.MANUAL)
public CompletionStage<Void> process(Message<MyData> message) {
// ack message out of order on some other vertx context, executor thread, etc.
return CompletableFuture.completedFuture(null);
}
EDIT: latest will commit on ack, so if the user processes out of order then that's when data can be lost. User requests 3 records and receives them with offsets 1,2.3. User only acks 3, Latest will commit to 3+1 even though the previous 2 records haven't been acked yet. Throttled on the other hand will wait until 1 and 2 are acked before committing to 3+1.
from quarkus.
Related Issues (20)
- The LOCAL class has a scope annotation but it must be ignored per the CDI rules HOT 11
- PostgreSQL DevServices with embedding Vectors HOT 1
- REST Client reporting "false negative" unrecognized URL configuration keys on startup HOT 4
- no post-process filtering in native image tracing agent HOT 2
- Use conditional dependencies for Flyway HOT 5
- Problem with @ConfigProperty in null when using a process in Apache Camel Quarkus HOT 5
- GraphQL Query generated from windows doesn't work HOT 2
- Vaadin @Push does not work - always DISABLED HOT 2
- Netty finalizers load classes from closed class loaders HOT 16
- Cannot change quarkus.log.category."WebApplicationException".level HOT 11
- quarkus-redis-client : JSON.MGET returning null HOT 7
- Expose validate-on-borrow provided by Agroal through Quarkus HOT 5
- Set pull policy for devservices HOT 6
- Error when deploying to OpenShift HOT 4
- Inject config properties into OpenApiFilter HOT 4
- RabbitMQ Message not nacked in case of queue limit HOT 2
- `@TestTransaction` Annotation Causes DeploymentException in Nested Test Classes HOT 4
- OutOfMemoryError when returning a large InputStream which is consumed slowly HOT 5
- Fix Reactive Resteasy to deal with request/responses without headers HOT 1
- Fix a broken xref to configuration-based-tenant-resolver HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quarkus.