anchitbhatia / Distributed-messaging-system

dsd-pub-sub-project-anchitbhatia created by GitHub Classroom
1 stars 0 forks source link

Only one record at a time? #7

Open adelgadocabrera opened 2 years ago

adelgadocabrera commented 2 years ago

This will only retrieve one record at a time right? I think it would be nice to have a while method that keeps retrieving records, and only exits** and does the Thread.sleep if it received a null record; in order to give some time for the broker to gather more records to send.

https://github.com/CS682-S22/dsd-pub-sub-project-anchitbhatia/blob/1cdf79e83816160c8ea636020afb70f7988ad19b/src/main/java/api/PullBasedConsumer.java#L49-L65

anchitbhatia commented 2 years ago

You are correct. In the current implementation it only fetches 1 record at a time as opposed to what Kafka does.