-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
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
refactor: make Nats JetStream scale #18876
Comments
Thanks for providing the context. Now I can understand #18873 better. (But there seem to be no many benefits for Kafka to do the change.) (And I'm not sure whether group rebalancing causes duplication, but was more thinking that failover will cause duplication. i.e., crash after checkpoint, but before ack) But I found there's a "partitioning" mechanism in NATS https://docs.nats.io/nats-concepts/subject_mapping (not delved into the details), which makes me think whether NATS's parallelism mechanism is like Pulsar. |
Their diagram tells the story. Subject Mapping does things inside broker, you can dynamically route messages into different subjects. RW, on the consumer side, does not need to care much about it. The consumer just needs to know which subject to consume, no matter
Yes, I have the same feeling. But Pulsar offers API to list sub-partitions, giving us a way to consume in Kafka's way.
Yes, I am just proposing changes just to Nats JetStream (maybe Pubsub later).
Kafka pauses the consumption during rebalancing. It is not designed for rapidly changing parallelism. |
I am still confuse about one point:
If we have several works A,B,C to read message from one broker in the future. Then B batch ACK the message and A C crashed. When A and C recovery, what message they will get from Nats Jetstream? |
B just acks messages sent to B, it does not involves messages sent to A and C. The broker records each message sent to which consumer. |
Current Impl
Our primary goal is to enable multiple workers to consume a single subject (the smallest unit in NATS) or a group of subjects (described using wildcards).
Challenges and Solutions
Drawback
exactly-once
toat-least-once
.TODO List
durable name
parameter) refactor: migrate Nats JetStream consumer to durable one #18895scale controller
andsource manager
on meta, to get the real-time fragment parallelism. feat: make Nats jetstream Source work in parallel #19529The text was updated successfully, but these errors were encountered: