Hi,

I'm new to Pub-Sub systems and currently comparing features of Kafka and 
Pulsar. I've started with simple producer and consumer and I notice a key 
difference in the consumer API.

  *   The Consumer API of Kafka poll ConsumerRecords<Integer, byte[]> records = 
consumer.poll(0); gets all the unacknowledged messages available in the topic 
at that point of time.
  *   But whereas the consumer API of Pulsar receive msg = consumer.receive(0, 
TimeUnit.SECONDS); gets only one unacknowledged message from the topic.
I'm wondering is there any advantage seen in Pulsar by returning only one 
message at a time. Can someone please help in clarifying?

P.S: I'm using the default subscription mode in consumer (Exclusive)

Regards,
Subash Kunjupillai

Reply via email to