Learn R Programming

rkafka (version 1.4)

rkafka.read: KAFKA consumer reading messages(single)

Description

This function reads messages received by a KAFKA consumer. It fetches one message at a time

Usage

rkafka.read(ConsumerObj)

Value

String

Arguments

ConsumerObj

Consumer through which messages are to be read Required:Mandatory Type:Consumer

Author

Shruti Gupta

Details

This function returns one message at a time from the topic to which the consumer is associated. If no new message is found with 'x' time(set by ConsumerTimeoutMs property), then it returns ""

References

To know when to use simple consumer and when to use High-level Consumer, refer the url below: https://cwiki.apache.org/confluence/display/KAFKA/0.8.0+SimpleConsumer+Example

To know how to use a high level consumer refer this: https://cwiki.apache.org/confluence/display/KAFKA/Consumer+Group+Example