Last data update: 2014.03.03

R: Creating simple KAFKA consumer
rkafka.createSimpleConsumerR Documentation

Creating simple KAFKA consumer

Description

This function creates the Simple Consumer

Usage

rkafka.createSimpleConsumer(kafkaServerURL, 
kafkaServerPort, connectionTimeOut, 
kafkaProducerBufferSize, clientId)

Arguments

kafkaServerURL
kafkaServerPort

Port number of the KAFKA server Required:Mandatory Type:String

connectionTimeOut

Connection Timeout in ms Required:Mandatory Type:String

kafkaProducerBufferSize

Buffer size Required:Mandatory Type:String

clientId

ID of the client Required:Mandatory Type:String

Details

There are two types of KAFKA consumers:High-Level and Simple. This function creates the Simple Consumer. Use caution on deciding to use the Simple Consumer as it doesn't persist offset.

Value

Doesn't return anything

Note

Warning: Ensure to run the rkafka.receiveFromSimpleConsumer() function before executing the rkafka.runFromSimpleConsumer() function

Author(s)

Shruti Gupta

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

Examples

## Not run: 
consumer1=rkafka.createSimpleConsumer("172.25.1.78","9092","10000","100000","test")

## End(Not run)

Results